diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-08-26 18:54:58 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-08-26 18:54:58 +0000 |
commit | db3a0f543e9a120d37823c6f2a2f1c693b69f2a1 (patch) | |
tree | c9521e4244b9a569855f5565e392198d55fe1bcc /lib/Sema/IdentifierResolver.cpp | |
parent | 42c39f39184c5ce9d7f489e5dcb7eec770728a9a (diff) |
Make sure to compare primary declaration contexts when determining whether a declaration is in scope
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80126 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/IdentifierResolver.cpp')
-rw-r--r-- | lib/Sema/IdentifierResolver.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/IdentifierResolver.cpp b/lib/Sema/IdentifierResolver.cpp index ceab859c90..1e5fb26fb5 100644 --- a/lib/Sema/IdentifierResolver.cpp +++ b/lib/Sema/IdentifierResolver.cpp @@ -134,7 +134,8 @@ bool IdentifierResolver::isDeclInScope(Decl *D, DeclContext *Ctx, return false; } - return D->getDeclContext()->getLookupContext() == Ctx->getPrimaryContext(); + return D->getDeclContext()->getLookupContext()->getPrimaryContext() == + Ctx->getPrimaryContext(); } /// AddDecl - Link the decl to its shadowed decl chain. |