diff options
author | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2019-02-15 03:06:15 +0000 |
---|---|---|
committer | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2019-02-15 03:06:15 +0000 |
commit | 0650f897a470730159d70e1617c9697c65b514d4 (patch) | |
tree | 9e225372c4c8af11e342f96517dee0e55cd8f962 /clang/lib/Sema/SemaLookup.cpp | |
parent | 3fb7d4f55fa028ce57dbdf533835b583fc10ecf8 (diff) | |
download | bcm5719-llvm-0650f897a470730159d70e1617c9697c65b514d4.tar.gz bcm5719-llvm-0650f897a470730159d70e1617c9697c65b514d4.zip |
Revert "Fix implementation of [temp.local]p4."
This reverts commit 40bd10b770813bd1471d46f514545437516aa4ba.
This seems to now emit an error when building the sanitizer tests:
http://green.lab.llvm.org/green/job/clang-stage1-configure-RA/53965/consoleFull.
llvm-svn: 354097
Diffstat (limited to 'clang/lib/Sema/SemaLookup.cpp')
-rw-r--r-- | clang/lib/Sema/SemaLookup.cpp | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp index 86960e0a1db..249be780985 100644 --- a/clang/lib/Sema/SemaLookup.cpp +++ b/clang/lib/Sema/SemaLookup.cpp @@ -2172,27 +2172,11 @@ bool Sema::LookupQualifiedName(LookupResult &R, DeclContext *LookupCtx, DeclContext::lookup_iterator FirstD = FirstPath->Decls.begin(); DeclContext::lookup_iterator CurrentD = Path->Decls.begin(); - // Get the decl that we should use for deduplicating this lookup. - auto GetRepresentativeDecl = [&](NamedDecl *D) -> Decl * { - // C++ [temp.local]p3: - // A lookup that finds an injected-class-name (10.2) can result in - // an ambiguity in certain cases (for example, if it is found in - // more than one base class). If all of the injected-class-names - // that are found refer to specializations of the same class - // template, and if the name is used as a template-name, the - // reference refers to the class template itself and not a - // specialization thereof, and is not ambiguous. - if (R.isTemplateNameLookup()) - if (auto *TD = getAsTemplateNameDecl(D)) - D = TD; - return D->getUnderlyingDecl()->getCanonicalDecl(); - }; - while (FirstD != FirstPath->Decls.end() && CurrentD != Path->Decls.end()) { - if (GetRepresentativeDecl(*FirstD) != - GetRepresentativeDecl(*CurrentD)) - break; + if ((*FirstD)->getUnderlyingDecl()->getCanonicalDecl() != + (*CurrentD)->getUnderlyingDecl()->getCanonicalDecl()) + break; ++FirstD; ++CurrentD; |