aboutsummaryrefslogtreecommitdiff
path: root/test/Preprocessor/macro_paste_identifier_error.c
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-06-13 19:02:56 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-06-13 19:02:56 +0000
commitc5f7459b2d60ad55ed2ab3cfd281d9c718f5a8df (patch)
treec22a849564903771cba8452681bb2741042c0ff5 /test/Preprocessor/macro_paste_identifier_error.c
parent568eae48a4e19c0359cdcd2a33b8ec9812e4abbc (diff)
Fix issue where a token paste which forms a /* or // would discard the rest of
the input: token-pasting was producing a tok::eof. Patch by Andy Gibbs! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158412 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Preprocessor/macro_paste_identifier_error.c')
-rw-r--r--test/Preprocessor/macro_paste_identifier_error.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/Preprocessor/macro_paste_identifier_error.c b/test/Preprocessor/macro_paste_identifier_error.c
new file mode 100644
index 0000000000..457e6f7fc1
--- /dev/null
+++ b/test/Preprocessor/macro_paste_identifier_error.c
@@ -0,0 +1,7 @@
+// RUN: %clang_cc1 -fms-extensions -Wno-invalid-token-paste %s -verify
+// RUN: %clang_cc1 -E -fms-extensions -Wno-invalid-token-paste %s | FileCheck %s
+// RUN: %clang_cc1 -E -fms-extensions -Wno-invalid-token-paste -x assembler-with-cpp %s | FileCheck %s
+
+#define foo a ## b ## = 0
+int foo;
+// CHECK: int ab = 0;