You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sema: fix reporting reexporting submodules imports as unused in API
Importing a clang submodule from Swift implies importing the top-level
module too. We make sure we don't warn on the import of the top-level
module as being unused when the submodule is used by associating all
references to the top-level module instead of submodules. This change
applies the same logic for transitive imports, marking the import of the
top-level module as used instead of the submodule with the `export *`.
In the updated test, this silences the following warning:
```
public import of 'ClangReexportedSubmodulePublic' was not used in public
declarations or inlinable code
```
rdar://139492772
publicfunc useTypedefed(a:TypedefType){} // expected-remark 2 {{typealias underlying type struct '_TypedefTypeUnderlying' is imported via 'ClangReexportedSubmodulePublicSub', which reexports definition from 'ClangReexportedSubmoduleTop'}}
345
+
// expected-remark @-1 {{type alias 'TypedefType' is imported via 'ClangReexportedSubmodulePublicSub', which reexports definition from 'ClangReexportedSubmoduleTop'}}
0 commit comments