summaryrefslogtreecommitdiffstats
path: root/test/Preprocessor/macro_paste_mscomment.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Preprocessor/macro_paste_mscomment.c')
-rw-r--r--test/Preprocessor/macro_paste_mscomment.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/Preprocessor/macro_paste_mscomment.c b/test/Preprocessor/macro_paste_mscomment.c
new file mode 100644
index 0000000..b0fc571
--- /dev/null
+++ b/test/Preprocessor/macro_paste_mscomment.c
@@ -0,0 +1,20 @@
+// RUN: clang-cc -P -E -fms-extensions %s | sed '/^#.\+/d' | tr -d '\n' |
+// RUN: grep '^int foo;int bar;int baz;$' | count 1
+// 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
+
+;
+
OpenPOWER on IntegriCloud