aboutsummaryrefslogtreecommitdiff
path: root/test/Preprocessor/macro_paste_mscomment.c
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-02-07 06:03:59 +0000
committerChris Lattner <sabre@nondot.org>2008-02-07 06:03:59 +0000
commit3f1cc838f9caf469990f23fccd0940263c0c61ff (patch)
tree75e2c88694fcd5857347d347f8e226b4a4e3d3c7 /test/Preprocessor/macro_paste_mscomment.c
parent18354de8c0e408a9a07cac75af2105d36587bc57 (diff)
Implement support for the extremely atrocious MS /##/ extension,
which pastes together a comment. This is only enabled with -fms-extensions of course. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46845 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Preprocessor/macro_paste_mscomment.c')
-rw-r--r--test/Preprocessor/macro_paste_mscomment.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/Preprocessor/macro_paste_mscomment.c b/test/Preprocessor/macro_paste_mscomment.c
new file mode 100644
index 0000000000..7e06b6d375
--- /dev/null
+++ b/test/Preprocessor/macro_paste_mscomment.c
@@ -0,0 +1,19 @@
+// RUN: clang %s -fsyntax-only -fms-extensions
+// This horrible stuff should preprocess into (other than whitespace):
+// int foo;
+// int bar;
+// int baz;
+
+int foo;
+
+#define comment /##/ dead tokens live here
+comment This is stupidity
+
+int bar;
+
+#define nested(x) int x comment cute little dead tokens...
+
+nested(baz) rise of the dead tokens
+
+;
+