diff options
author | Hans Wennborg <hans@chromium.org> | 2020-03-18 09:35:07 +0100 |
---|---|---|
committer | Hans Wennborg <hans@chromium.org> | 2020-03-18 09:35:07 +0100 |
commit | 26c762df6c48ae6bb66f76ab7e7e97bbc922ae03 (patch) | |
tree | a2512ff3745a380c07b23053fca7603c297b4e0f /clang/lib/Sema | |
parent | 135744ce689569e7c64033bb5812572d3000239b (diff) | |
download | bcm5719-llvm-26c762df6c48ae6bb66f76ab7e7e97bbc922ae03.tar.gz bcm5719-llvm-26c762df6c48ae6bb66f76ab7e7e97bbc922ae03.zip |
Revert "[Concepts] Fix incorrect control flow when TryAnnotateTypeConstraint annotates an invalid template-id"
We're not planning more release candidates for 10.0.0 at the moment, so
reverting for now.
This reverts commit 135744ce689569e7c64033bb5812572d3000239b.
Diffstat (limited to 'clang/lib/Sema')
-rwxr-xr-x | clang/lib/Sema/SemaTemplate.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp index c38c724ed9b..4f577a3cf74 100755 --- a/clang/lib/Sema/SemaTemplate.cpp +++ b/clang/lib/Sema/SemaTemplate.cpp @@ -174,8 +174,7 @@ TemplateNameKind Sema::isTemplateName(Scope *S, ParsedType ObjectTypePtr, bool EnteringContext, TemplateTy &TemplateResult, - bool &MemberOfUnknownSpecialization, - bool Disambiguation) { + bool &MemberOfUnknownSpecialization) { assert(getLangOpts().CPlusPlus && "No template names in C!"); DeclarationName TName; @@ -205,7 +204,7 @@ TemplateNameKind Sema::isTemplateName(Scope *S, LookupResult R(*this, TName, Name.getBeginLoc(), LookupOrdinaryName); if (LookupTemplateName(R, S, SS, ObjectType, EnteringContext, MemberOfUnknownSpecialization, SourceLocation(), - &AssumedTemplate, Disambiguation)) + &AssumedTemplate)) return TNK_Non_template; if (AssumedTemplate != AssumedTemplateKind::None) { @@ -372,8 +371,7 @@ bool Sema::LookupTemplateName(LookupResult &Found, bool EnteringContext, bool &MemberOfUnknownSpecialization, SourceLocation TemplateKWLoc, - AssumedTemplateKind *ATK, - bool Disambiguation) { + AssumedTemplateKind *ATK) { if (ATK) *ATK = AssumedTemplateKind::None; @@ -496,9 +494,8 @@ bool Sema::LookupTemplateName(LookupResult &Found, } } - if (Found.empty() && !IsDependent && !Disambiguation) { - // If we did not find any names, and this is not a disambiguation, attempt - // to correct any typos. + if (Found.empty() && !IsDependent) { + // If we did not find any names, attempt to correct any typos. DeclarationName Name = Found.getLookupName(); Found.clear(); // Simple filter callback that, for keywords, only accepts the C++ *_cast |