[clang] [Clang] disallow # operators in attribute argument lists (PR #147308)

Corentin Jabot via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 7 08:11:55 PDT 2025


================
@@ -488,6 +488,13 @@ unsigned Parser::ParseAttributeArgsCommon(
   bool AttributeHasVariadicIdentifierArg =
       attributeHasVariadicIdentifierArg(*AttrName, Form.getSyntax(), ScopeName);
 
+  if (Tok.is(tok::hash) || Tok.is(tok::hashhash)) {
----------------
cor3ntin wrote:

We are supposed to reject `%:`, yes
https://eel.is/c++draft/lex.operators#nt:operator-or-punctuator

https://github.com/llvm/llvm-project/pull/147308


More information about the cfe-commits mailing list