From 26c762df6c48ae6bb66f76ab7e7e97bbc922ae03 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Wed, 18 Mar 2020 09:35:07 +0100 Subject: 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. --- clang/lib/Sema/SemaTemplate.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'clang/lib/Sema') 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 -- cgit v1.2.3