diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-09-01 17:22:34 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-09-01 17:22:34 +0000 |
commit | 61481dad22ebca3fba3fe4fb67a3b926d0895e9c (patch) | |
tree | 0d363a2de3b2e1b41b45eca905fae88a3d9454a5 /lib/Sema | |
parent | b7cd17cfd2970636af0fe9b491bab1acf0009c2f (diff) |
Add DeclContext::Equals to compare declaration contexts based on their primary context. Use this instead of pointer comparisons
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80690 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema')
-rw-r--r-- | lib/Sema/IdentifierResolver.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Sema/IdentifierResolver.cpp b/lib/Sema/IdentifierResolver.cpp index 1e5fb26fb5..a36b85a87a 100644 --- a/lib/Sema/IdentifierResolver.cpp +++ b/lib/Sema/IdentifierResolver.cpp @@ -134,8 +134,7 @@ bool IdentifierResolver::isDeclInScope(Decl *D, DeclContext *Ctx, return false; } - return D->getDeclContext()->getLookupContext()->getPrimaryContext() == - Ctx->getPrimaryContext(); + return D->getDeclContext()->getLookupContext()->Equals(Ctx); } /// AddDecl - Link the decl to its shadowed decl chain. |