diff options
Diffstat (limited to 'lib/Sema/SemaTemplate.cpp')
-rw-r--r-- | lib/Sema/SemaTemplate.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp index b5b99f978e..35d3cfa433 100644 --- a/lib/Sema/SemaTemplate.cpp +++ b/lib/Sema/SemaTemplate.cpp @@ -354,12 +354,14 @@ void Sema::LookupTemplateName(LookupResult &Found, return; } - if (S && !ObjectType.isNull() && !ObjectTypeSearchedInScope) { - // C++ [basic.lookup.classref]p1: + if (S && !ObjectType.isNull() && !ObjectTypeSearchedInScope && + !(getLangOpts().CPlusPlus0x && !Found.empty())) { + // C++03 [basic.lookup.classref]p1: // [...] If the lookup in the class of the object expression finds a // template, the name is also looked up in the context of the entire // postfix-expression and [...] // + // Note: C++11 does not perform this second lookup. LookupResult FoundOuter(*this, Found.getLookupName(), Found.getNameLoc(), LookupOrdinaryName); LookupName(FoundOuter, S); |