diff options
author | Richard Smith <richard@metafoo.co.uk> | 2020-03-20 14:40:58 -0700 |
---|---|---|
committer | Richard Smith <richard@metafoo.co.uk> | 2020-03-20 14:53:09 -0700 |
commit | fc8a009bf39d74ce0ee3f586e0b4056035db30cb (patch) | |
tree | d7b7425698f1558ce1388d8963131b5a204ba862 /clang/lib/Parse/ParseDecl.cpp | |
parent | 1993f95f2b1eb2d8da7f1a01e977d8fe06314bcf (diff) | |
download | llvm-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.cpp | 9 |
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()) { |