aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard@metafoo.co.uk>2020-03-20 14:40:58 -0700
committerRichard Smith <richard@metafoo.co.uk>2020-03-20 14:53:09 -0700
commitfc8a009bf39d74ce0ee3f586e0b4056035db30cb (patch)
treed7b7425698f1558ce1388d8963131b5a204ba862 /clang/lib/Parse/ParseDecl.cpp
parent1993f95f2b1eb2d8da7f1a01e977d8fe06314bcf (diff)
downloadllvm-fc8a009bf39d74ce0ee3f586e0b4056035db30cb.zip
llvm-fc8a009bf39d74ce0ee3f586e0b4056035db30cb.tar.gz
llvm-fc8a009bf39d74ce0ee3f586e0b4056035db30cb.tar.bz2
Clean up and simplify after collision of c48442c and 19fccc5, which
fixed the same bug in two similar ways.
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r--clang/lib/Parse/ParseDecl.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index ba4f5d8..e3c784c 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()) {