diff options
Diffstat (limited to 'lib/Sema/SemaLookup.cpp')
-rw-r--r-- | lib/Sema/SemaLookup.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp index 5964d7232a..c232515ef3 100644 --- a/lib/Sema/SemaLookup.cpp +++ b/lib/Sema/SemaLookup.cpp @@ -1123,6 +1123,11 @@ bool Sema::LookupName(LookupResult &R, Scope *S, bool AllowBuiltinCreation) { !isa<ImplicitParamDecl>(*I)) continue; + // If this declaration is module-private and it came from an AST + // file, we can't see it. + if ((*I)->isModulePrivate() && (*I)->isFromASTFile()) + continue; + R.addDecl(*I); if ((*I)->getAttr<OverloadableAttr>()) { |