File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
test/Interop/Cxx/objc-correctness Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -1158,6 +1158,14 @@ namespace {
11581158 // Do not import namespace declarations marked as 'swift_private'.
11591159 if (decl->hasAttr <clang::SwiftPrivateAttr>())
11601160 return nullptr ;
1161+ // Workaround for os module declaring `namespace os` on Darwin, causing
1162+ // name lookup issues. That namespace only declares utility functions that
1163+ // are not supposed to be used from Swift, so let's just not import the
1164+ // namespace (rdar://119044493).
1165+ if (decl->getIdentifier () && decl->getName () == " os" &&
1166+ decl->getOwningModule () &&
1167+ decl->getOwningModule ()->getTopLevelModuleName () == " os" )
1168+ return nullptr ;
11611169 // If this is a top-level namespace, don't put it in the module we're
11621170 // importing, put it in the "__ObjC" module that is implicitly imported.
11631171 if (!decl->getParent ()->isNamespace ())
Original file line number Diff line number Diff line change 1+ // RUN: %target-swift-frontend -typecheck -verify -I %S/Inputs -cxx-interoperability-mode=default %s
2+
3+ // REQUIRES: objc_interop
4+ // REQUIRES: VENDOR=apple
5+
6+ import os
7+
8+ var _: os . Logger ! = nil
You can’t perform that action at this time.
0 commit comments