[clang] [Clang][AArch64] Change SME attributes for shared/new/preserved state. (PR #76971)

via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 4 09:43:55 PST 2024


================
@@ -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


More information about the cfe-commits mailing list