summaryrefslogtreecommitdiffstats
path: root/clang/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
commita60742a3d00ee31eca2eb41ef34abf3258dac937 (patch)
treec6f68d294c92416ea56544e4c5a7343abd1e57f9 /clang/test/Preprocessor/macro_paste_identifier_error.c
parent429c134d5d447168c828be8510f94193162887d2 (diff)
downloadbcm5719-llvm-a60742a3d00ee31eca2eb41ef34abf3258dac937.tar.gz
bcm5719-llvm-a60742a3d00ee31eca2eb41ef34abf3258dac937.zip
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! llvm-svn: 158412
Diffstat (limited to 'clang/test/Preprocessor/macro_paste_identifier_error.c')
-rw-r--r--clang/test/Preprocessor/macro_paste_identifier_error.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/Preprocessor/macro_paste_identifier_error.c b/clang/test/Preprocessor/macro_paste_identifier_error.c
new file mode 100644
index 00000000000..457e6f7fc1a
--- /dev/null
+++ b/clang/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;
OpenPOWER on IntegriCloud