summaryrefslogtreecommitdiffstats
path: root/test/Preprocessor/macro_fn_varargs_named.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Preprocessor/macro_fn_varargs_named.c')
-rw-r--r--test/Preprocessor/macro_fn_varargs_named.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Preprocessor/macro_fn_varargs_named.c b/test/Preprocessor/macro_fn_varargs_named.c
new file mode 100644
index 0000000..c2841b1
--- /dev/null
+++ b/test/Preprocessor/macro_fn_varargs_named.c
@@ -0,0 +1,10 @@
+// RUN: clang-cc -E %s | grep '^a: x$' &&
+// RUN: clang-cc -E %s | grep '^b: x y, z,h$' &&
+// RUN: clang-cc -E %s | grep '^c: foo(x)$'
+
+#define A(b, c...) b c
+a: A(x)
+b: A(x, y, z,h)
+
+#define B(b, c...) foo(b, ## c)
+c: B(x)
OpenPOWER on IntegriCloud