[clang] fc8a009 - Clean up and simplify after collision of c48442c and 19fccc5, which
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 20 14:53:22 PDT 2020
Author: Richard Smith
Date: 2020-03-20T14:53:09-07:00
New Revision: fc8a009bf39d74ce0ee3f586e0b4056035db30cb
URL: https://github.com/llvm/llvm-project/commit/fc8a009bf39d74ce0ee3f586e0b4056035db30cb
DIFF: https://github.com/llvm/llvm-project/commit/fc8a009bf39d74ce0ee3f586e0b4056035db30cb.diff
LOG: Clean up and simplify after collision of c48442c and 19fccc5, which
fixed the same bug in two similar ways.
Added:
Modified:
clang/lib/Parse/ParseDecl.cpp
Removed:
################################################################################
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index ba4f5d86612a..e3c784c1b61c 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/lib/Parse/ParseDecl.cpp
@@ -3251,10 +3251,8 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS,
if (!TypeRep) {
if (TryAnnotateTypeConstraint())
goto DoneWithDeclSpec;
- if (isTypeConstraintAnnotation())
- continue;
- if (NextToken().is(tok::annot_template_id))
- // Might have been annotated by TryAnnotateTypeConstraint.
+ if (Tok.isNot(tok::annot_cxxscope) ||
+ NextToken().isNot(tok::identifier))
continue;
// Eat the scope spec so the identifier is current.
ConsumeAnnotationToken();
@@ -3409,9 +3407,6 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS,
goto DoneWithDeclSpec;
if (Tok.isNot(tok::identifier))
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()) {
More information about the cfe-commits
mailing list