summaryrefslogtreecommitdiff
path: root/test/Preprocessor/macro_rescan.c
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2009-06-02 17:58:47 +0000
committerEd Schouten <ed@FreeBSD.org>2009-06-02 17:58:47 +0000
commitec2b103c267a06a66e926f62cd96767b280f5cf5 (patch)
treece7d964cbb5e39695b71481698f10cb099c23d4a /test/Preprocessor/macro_rescan.c
Notes
Diffstat (limited to 'test/Preprocessor/macro_rescan.c')
-rw-r--r--test/Preprocessor/macro_rescan.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Preprocessor/macro_rescan.c b/test/Preprocessor/macro_rescan.c
new file mode 100644
index 0000000000000..17b4dc2756fdb
--- /dev/null
+++ b/test/Preprocessor/macro_rescan.c
@@ -0,0 +1,9 @@
+// RUN: clang-cc -E %s | grep 'ei_1 = (17 +1);' &&
+// RUN: clang-cc -E %s | grep 'ei_2 = (M1)(17);'
+
+#define M1(a) (a+1)
+#define M2(b) b
+
+int ei_1 = M2(M1)(17); /* becomes int ei_1 = (17+1); */
+int ei_2 = (M2(M1))(17); /* becomes int ei_2 = (M1)(17); */
+