File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -4559,6 +4559,13 @@ void ClangImporter::Implementation::lookupValue(
4559
4559
if (!decl) continue ;
4560
4560
}
4561
4561
4562
+ // If we found a declaration from the standard library, make sure
4563
+ // it does not show up in the lookup results for the imported
4564
+ // module.
4565
+ if (decl->getDeclContext ()->isModuleScopeContext () &&
4566
+ decl->getModuleContext () == getStdlibModule ())
4567
+ continue ;
4568
+
4562
4569
// If the name matched, report this result.
4563
4570
if (decl->getFullName ().matchesRef (name))
4564
4571
consumer.foundDecl (decl, DeclVisibilityKind::VisibleAtTopLevel);
Original file line number Diff line number Diff line change 1
1
// RUN: rm -rf %t && mkdir %t
2
2
// RUN: %build-irgen-test-overlays
3
3
// RUN: %target-swift-frontend -sdk %S/Inputs -I %t %s -emit-ir | FileCheck %s
4
+ // RUN: %target-swift-frontend -enable-swift-name-lookup-tables -sdk %S/Inputs -I %t %s -emit-ir | FileCheck %s
4
5
5
6
// REQUIRES: CPU=x86_64
6
7
// REQUIRES: objc_interop
You can’t perform that action at this time.
0 commit comments