aboutsummaryrefslogtreecommitdiff
path: root/test/Preprocessor/output_paste_avoid.c
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-01-15 05:22:14 +0000
committerChris Lattner <sabre@nondot.org>2008-01-15 05:22:14 +0000
commitb1a17ae9d339e59b81509e593907f2f924231dab (patch)
treee9fa469d9d8b73ba0cf13e7600f4693ea30008e9 /test/Preprocessor/output_paste_avoid.c
parentfdc0d3c9e1c90158e1cc03be37e037690c85b6f4 (diff)
avoid pasting L + "foo" into L"foo".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46000 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Preprocessor/output_paste_avoid.c')
-rw-r--r--test/Preprocessor/output_paste_avoid.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Preprocessor/output_paste_avoid.c b/test/Preprocessor/output_paste_avoid.c
index 842063a908..065c73e939 100644
--- a/test/Preprocessor/output_paste_avoid.c
+++ b/test/Preprocessor/output_paste_avoid.c
@@ -1,5 +1,6 @@
// RUN: clang -E %s | grep '+ + - - + + = = =' &&
// RUN: clang -E %s | not grep -F '...'
+// RUN: clang -E %s | not grep -F 'L"str"'
// This should print as ".. ." to avoid turning into ...
#define y(a) ..a
@@ -10,3 +11,8 @@ y(.)
#define f(x) =x=
+PLUS -EMPTY- PLUS+ f(=)
+
+// Should expand to L "str" not L"str"
+#define test(x) L#x
+test(str)
+