================
@@ -477,3 +477,10 @@ namespace P2361 {
 }
 
 alignas(int) struct AlignAsAttribute {}; // expected-error {{misplaced 
attributes; expected attributes here}}
+
+namespace GH147217 {
+  [[clang::annotate(#)]] void a();    // expected-error {{'#' is not allowed 
in an attribute argument list}}
----------------
AaronBallman wrote:

Can you add a test that shows we still accept this in C?

Also, can you add a test showing that the operators still work in a 
preprocessor context? e.g.,
```
#define ATTR_STR(X) [[clang::annotate(#X)]]
#define ATTR_PASTE(X, Y) [[clang::annotate("test", X ## Y)]]

ATTR_STR(stringify) void func1();
ATTR_PASTE(1, 2) void func2();
```
(This should probably be a `-E` test so we can validate the expected output of 
the preprocessor operations.)

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

Reply via email to