diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-12-02 20:08:44 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-12-02 20:08:44 +0000 |
commit | 2a5d14898a070435790310c1e51e73f955c5c4e2 (patch) | |
tree | 9687aee3fa840f326a7c6ec11035bb13bd8ed7da /clang/lib/Sema/SemaLookup.cpp | |
parent | d87f7af1f3651b5a4ece5bf1b84b93d754a73cfb (diff) | |
download | bcm5719-llvm-2a5d14898a070435790310c1e51e73f955c5c4e2.tar.gz bcm5719-llvm-2a5d14898a070435790310c1e51e73f955c5c4e2.zip |
Make sure that name lookup in C checks whether a name is hidden.
llvm-svn: 145700
Diffstat (limited to 'clang/lib/Sema/SemaLookup.cpp')
-rw-r--r-- | clang/lib/Sema/SemaLookup.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp index 5964d7232a8..c232515ef36 100644 --- a/clang/lib/Sema/SemaLookup.cpp +++ b/clang/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>()) { |