================
@@ -760,8 +760,9 @@ KEYWORD(__builtin_available              , KEYALL)
 KEYWORD(__builtin_sycl_unique_stable_name, KEYSYCL)
 
 // Keywords defined by Attr.td.
+// The "EMPTY ## X" is used to prevent early macro-expansion of the keyword.
 #ifndef KEYWORD_ATTRIBUTE
-#define KEYWORD_ATTRIBUTE(X, ...) KEYWORD(X, KEYALL)
+#define KEYWORD_ATTRIBUTE(X, HASARG, EMPTY) KEYWORD(EMPTY ## X, KEYALL)
----------------
nikic wrote:

Macros don't get expanded in `##` so this will produce something like 
`EMPTY__arm_streaming`. I believe the only way to actually get an empty 
concatenation is via an empty macro argument.

Here's a godbolt to experiment: https://cpp.godbolt.org/z/d9zc7hs3a

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

Reply via email to