================
@@ -6787,6 +6787,9 @@ void Parser::ParseDirectDeclarator(Declarator &D) {
       // For consistency with attribute parsing.
       Diag(Tok, diag::err_keyword_not_allowed) << Tok.getIdentifierInfo();
       ConsumeToken();
+      BalancedDelimiterTracker T(*this, tok::l_paren);
----------------
rsandifo-arm wrote:

I think this needs to be conditional on whether the attribute accepts 
arguments.  In some contexts it's possible for an argumentless keyword like 
`__arm_streaming` to be followed by parentheses.

So from a parsing perspective, when each new keyword attribute is added, a 
binding decision has to be made about whether the keyword always takes 
arguments (and so parens are required) or never takes arguments (and so parens 
are immaterial).

The same comment applies to the other parsing changes as well.

https://github.com/llvm/llvm-project/pull/76971
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to