diff options
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()) { |