Clean up and simplify after collision of c48442c and 19fccc5, which

fixed the same bug in two similar ways.
This commit is contained in:
Richard Smith 2020-03-20 14:40:58 -07:00
parent 1993f95f2b
commit fc8a009bf3
1 changed files with 2 additions and 7 deletions

View File

@ -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()) {