================
@@ -0,0 +1,22 @@
+// RUN: %clang_cc1 -Eonly -verify %s
+// RUN: %clang_cc1 -Eonly -verify -x c++ %s
+
+// Consecutive ## operators must not be collapsed into a single paste.
+#define PASTE(x, y) x####y
+
+PASTE(1,) // expected-error {{'##' cannot appear at end of macro expansion}}
+PASTE(1, 2) // expected-error {{pasting formed '1##', an invalid preprocessing
token}}
+PASTE(, 2)
----------------
shafik wrote:
Also please add comment that mentions this is a regression test for GH239457
https://github.com/llvm/llvm-project/pull/239693
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits