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/Parse | |
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/Parse')
-rw-r--r-- | clang/lib/Parse/ParseDecl.cpp | 6 | ||||
-rw-r--r-- | clang/lib/Parse/ParseTemplate.cpp | 3 |
2 files changed, 1 insertions, 8 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index 6353e14bc41..cdc3506d5c6 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -3252,9 +3252,6 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS, goto DoneWithDeclSpec; if (isTypeConstraintAnnotation()) continue; - if (NextToken().is(tok::annot_template_id)) - // Might have been annotated by TryAnnotateTypeConstraint. - continue; // Eat the scope spec so the identifier is current. ConsumeAnnotationToken(); ParsedAttributesWithRange Attrs(AttrFactory); @@ -3408,9 +3405,6 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS, goto DoneWithDeclSpec; if (isTypeConstraintAnnotation()) continue; - if (Tok.is(tok::annot_template_id)) - // Might have been annotated by TryAnnotateTypeConstraint. - continue; ParsedAttributesWithRange Attrs(AttrFactory); if (ParseImplicitInt(DS, nullptr, TemplateInfo, AS, DSContext, Attrs)) { if (!Attrs.empty()) { diff --git a/clang/lib/Parse/ParseTemplate.cpp b/clang/lib/Parse/ParseTemplate.cpp index 609640576e9..3bc4e3596f1 100644 --- a/clang/lib/Parse/ParseTemplate.cpp +++ b/clang/lib/Parse/ParseTemplate.cpp @@ -710,8 +710,7 @@ bool Parser::TryAnnotateTypeConstraint() { /*ObjectType=*/ParsedType(), /*EnteringContext=*/false, PossibleConcept, - MemberOfUnknownSpecialization, - /*Disambiguation=*/true); + MemberOfUnknownSpecialization); if (MemberOfUnknownSpecialization || !PossibleConcept || TNK != TNK_Concept_template) { if (SS.isNotEmpty()) |