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


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to