summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-08-17 20:24:17 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-08-17 20:24:17 +0000
commit6dc8ae10aa47c59f44339f1e024ee640c72092a8 (patch)
tree80f4364f16cacf581461b7f06b446c966a01a4e5 /clang/lib/Sema/SemaDecl.cpp
parent8778fea0bb0247591c2a54d34c76dd631ab70cd7 (diff)
downloadbcm5719-llvm-6dc8ae10aa47c59f44339f1e024ee640c72092a8.tar.gz
bcm5719-llvm-6dc8ae10aa47c59f44339f1e024ee640c72092a8.zip
[modules] When parsing the base specifiers of a parse-merged class, the current
context is the class itself but lookups should be performed starting with the lookup parent of the class (class and base members don't shadow types from the surrounding context because they have not been declared yet). llvm-svn: 245236
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 9282ecad4cb..a8d1e1203e4 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -1089,7 +1089,9 @@ Sema::SkippedDefinitionContext Sema::ActOnTagStartSkippedDefinition(Scope *S,
auto Result = static_cast<SkippedDefinitionContext>(CurContext);
CurContext = cast<TagDecl>(D)->getDefinition();
assert(CurContext && "skipping definition of undefined tag");
- S->setEntity(CurContext);
+ // Start lookups from the parent of the current context; we don't want to look
+ // into the pre-existing complete definition.
+ S->setEntity(CurContext->getLookupParent());
return Result;
}
OpenPOWER on IntegriCloud