summaryrefslogtreecommitdiffstats
path: root/test/Preprocessor/macro_fn_preexpand.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Preprocessor/macro_fn_preexpand.c')
-rw-r--r--test/Preprocessor/macro_fn_preexpand.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Preprocessor/macro_fn_preexpand.c b/test/Preprocessor/macro_fn_preexpand.c
new file mode 100644
index 0000000..a392263
--- /dev/null
+++ b/test/Preprocessor/macro_fn_preexpand.c
@@ -0,0 +1,12 @@
+// RUN: clang-cc %s -E | grep 'pre: 1 1 X' &&
+// RUN: clang-cc %s -E | grep 'nopre: 1A(X)'
+
+/* Preexpansion of argument. */
+#define A(X) 1 X
+pre: A(A(X))
+
+/* The ## operator disables preexpansion. */
+#undef A
+#define A(X) 1 ## X
+nopre: A(A(X))
+
OpenPOWER on IntegriCloud