aboutsummaryrefslogtreecommitdiff
path: root/test/Preprocessor/macro_paste_bad.c
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-06-14 18:12:03 +0000
committerChris Lattner <sabre@nondot.org>2011-06-14 18:12:03 +0000
commit0e0b6931598be8a50ac5c6e0be595b35da276df9 (patch)
tree9cf56b781bb885d368178a2cd1ff6c74de119b01 /test/Preprocessor/macro_paste_bad.c
parent1abd35950bcb0761887dca0995c68b8a9dc8916f (diff)
Fix a crash on the testcase in PR9981 / rdar://9486765.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133003 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Preprocessor/macro_paste_bad.c')
-rw-r--r--test/Preprocessor/macro_paste_bad.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Preprocessor/macro_paste_bad.c b/test/Preprocessor/macro_paste_bad.c
index 2af0173040..1c0b74ba29 100644
--- a/test/Preprocessor/macro_paste_bad.c
+++ b/test/Preprocessor/macro_paste_bad.c
@@ -33,3 +33,9 @@ XX // expected-error {{attempt to use a poisoned identifier}}
int VA; // expected-warning {{__VA_ARGS__ can only appear in the expansion of a C99 variadic macro}}
+// PR9981
+#define M1(A) A
+#define M2(X)
+M1(M2(##)) // expected-error {{pasting formed '()', an invalid preprocessing token}}
+
+