mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Out handling of clang submodules was handled differently between DocInfo and InterfaceGen. For InterfaceGen submodules were mapped back to their top-level clang modules (or their Swift overlay if it had one) before being passed into printSubmoduleInterface, along with the dot separated name of the submodule. For DocInfo, they were not, and only the rightmost component of their name was passed. The call to retrieve the decls from a ModuleDecl doesn't work if the ModuleDecl wraps a clang submodule, so we were missing these decls. InterfaceGen for submodules also shouldn't have been mapping the module back to the overlay of top-level clang module, as that meant we ended up printing import decls from the Swift overlay in the submodule's interface. Resolves rdar://problem/57338105
16 lines
664 B
Swift
16 lines
664 B
Swift
// REQUIRES: objc_interop
|
|
|
|
// FIXME: the test output we're comparing to is specific to macOS.
|
|
// REQUIRES: OS=macosx
|
|
|
|
// RUN: %empty-directory(%t)
|
|
// RUN: %build-clang-importer-objc-overlays
|
|
|
|
// RUN: %sourcekitd-test -req=doc-info -module Foo -- -F %S/../Inputs/libIDE-mock-sdk \
|
|
// RUN: -target %target-triple %clang-importer-sdk-nosource -I %t | %sed_clean > %t.response
|
|
// RUN: %diff -u %s.response %t.response
|
|
|
|
// RUN: %sourcekitd-test -req=doc-info -module Foo.FooSub -- -F %S/../Inputs/libIDE-mock-sdk \
|
|
// RUN: -target %target-triple %clang-importer-sdk-nosource -I %t | %sed_clean > %t.response
|
|
// RUN: %diff -u %s.sub.response %t.response
|