summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-01-07 16:34:42 +0000
committerDouglas Gregor <dgregor@apple.com>2009-01-07 16:34:42 +0000
commite955880357af90d74eff9d4b270da2a820a8dcee (patch)
tree583893cbc6bda44cd054c80d982cfa770fbcadf4 /clang/lib/Sema/SemaDecl.cpp
parent4bba1ed9bc6cbf580d02c62c2c800420ed8aa204 (diff)
downloadbcm5719-llvm-e955880357af90d74eff9d4b270da2a820a8dcee.tar.gz
bcm5719-llvm-e955880357af90d74eff9d4b270da2a820a8dcee.zip
Use DeclContext::getLookupContext wherever necessary to ensure that we look through transparent contexts
llvm-svn: 61861
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index ea2ea074aad..e1c9efc326e 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -116,7 +116,8 @@ void Sema::PushOnScopeChains(NamedDecl *D, Scope *S) {
// in this case the class name or enumeration name is hidden.
if (TagDecl *TD = dyn_cast<TagDecl>(D)) {
// We are pushing the name of a tag (enum or class).
- if (CurContext == TD->getDeclContext()) {
+ if (CurContext->getLookupContext()
+ == TD->getDeclContext()->getLookupContext()) {
// We're pushing the tag into the current context, which might
// require some reshuffling in the identifier resolver.
IdentifierResolver::iterator
@@ -679,7 +680,7 @@ void Sema::CheckForFileScopedRedefinitions(Scope *S, VarDecl *VD) {
bool VDIsTentative = isTentativeDefinition(VD);
bool VDIsIncompleteArray = VD->getType()->isIncompleteArrayType();
- // FIXME: I don't this will actually see all of the
+ // FIXME: I don't think this will actually see all of the
// redefinitions. Can't we check this property on-the-fly?
for (IdentifierResolver::iterator
I = IdResolver.begin(VD->getIdentifier(),
OpenPOWER on IntegriCloud