[Sema] Force considering the __ObjC module as imported publicly

This commit is contained in:
Alexis Laferrière
2022-07-07 14:57:00 -07:00
parent cbfa4b7355
commit 82e93806a8

View File

@@ -2442,6 +2442,9 @@ RestrictedImportKind SourceFile::getRestrictedImportKind(const ModuleDecl *modul
auto &imports = getASTContext().getImportCache();
RestrictedImportKind importKind = RestrictedImportKind::Implicit;
if (module->getName().str() == CLANG_HEADER_MODULE_NAME)
return RestrictedImportKind::None;
// Look at the imports of this source file.
for (auto &desc : *Imports) {
// Ignore implementation-only imports.