diff options
author | John McCall <rjmccall@apple.com> | 2009-11-10 09:20:04 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2009-11-10 09:20:04 +0000 |
commit | 12ea5780e7729de3fee009525e49468fd8d0b713 (patch) | |
tree | dea95d8b65ab2a9009979fb406175e101ec73d20 /lib/Sema/SemaLookup.cpp | |
parent | b6aa69ae31ec78fc41cec5b8f705761d3bb2a8bd (diff) |
Make a somewhat more convincing test case for unqualified lookup through
using directives, and fix a bug thereby exposed: since we're playing
tricks with pointers, we need to make certain we're always using the same
pointers for things.
Also tweak an existing error message.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86679 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaLookup.cpp')
-rw-r--r-- | lib/Sema/SemaLookup.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp index f6ae4e147f..eb7c3fa80e 100644 --- a/lib/Sema/SemaLookup.cpp +++ b/lib/Sema/SemaLookup.cpp @@ -169,6 +169,7 @@ namespace { DeclContext *Common = UD->getNominatedNamespace(); while (!Common->Encloses(EffectiveDC)) Common = Common->getParent(); + Common = Common->getPrimaryContext(); list.push_back(UnqualUsingEntry(UD->getNominatedNamespace(), Common)); } @@ -187,7 +188,7 @@ namespace { std::pair<const_iterator,const_iterator> getNamespacesFor(DeclContext *DC) const { - return std::equal_range(begin(), end(), DC, + return std::equal_range(begin(), end(), DC->getPrimaryContext(), UnqualUsingEntry::Comparator()); } }; |