]> granicus.if.org Git - clang/commitdiff
merge all the macro disable tests by using filecheck.
authorChris Lattner <sabre@nondot.org>
Fri, 26 Mar 2010 17:46:33 +0000 (17:46 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 26 Mar 2010 17:46:33 +0000 (17:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99625 91177308-0d34-0410-b5e6-96231b3b80d8

test/Preprocessor/macro_disable.c
test/Preprocessor/macro_disable2.c [deleted file]
test/Preprocessor/macro_disable3.c [deleted file]
test/Preprocessor/macro_disable4.c [deleted file]

index d6509c35bf2cc6c4568987e0f9fee993a03d5612..95f4784398ec903302fc5e3166c076273cc91a1f 100644 (file)
@@ -1,5 +1,27 @@
-// RUN: %clang_cc1 -E %s | grep 'a: 2 + M_0(3)(4)(5);'
-// RUN: %clang_cc1 -E %s | grep 'b: 4 + 4 + 3 + 2 + 1 + M_0(3)(2)(1);'
+// RUN: %clang_cc1 %s -E | FileCheck -strict-whitespace %s
+// Check for C99 6.10.3.4p2.
+
+#define f(a) f(x * (a)) 
+#define x 2 
+#define z z[0] 
+f(f(z)); 
+// CHECK: f(2 * (f(2 * (z[0]))));
+
+
+
+#define A A B C 
+#define B B C A 
+#define C C A B 
+A 
+// CHECK: A B C A B A C A B C A
+
+
+// PR1820
+#define i(x) h(x
+#define h(x) x(void) 
+extern int i(i));
+// CHECK: int i(void)
+
 
 #define M_0(x) M_ ## x 
 #define M_1(x) x + M_0(0) 
@@ -11,3 +33,5 @@
 a: M_0(1)(2)(3)(4)(5);
 b: M_0(5)(4)(3)(2)(1);
 
+// CHECK: a: 2 + M_0(3)(4)(5);
+// CHECK: b: 4 + 4 + 3 + 2 + 1 + M_0(3)(2)(1);
\ No newline at end of file
diff --git a/test/Preprocessor/macro_disable2.c b/test/Preprocessor/macro_disable2.c
deleted file mode 100644 (file)
index 229cf32..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// RUN: %clang_cc1 -E %s | grep 'A B C A B A C A B C A'
-
-#define A A B C 
-#define B B C A 
-#define C C A B 
-A 
-
diff --git a/test/Preprocessor/macro_disable3.c b/test/Preprocessor/macro_disable3.c
deleted file mode 100644 (file)
index eab0a5e..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-// RUN: %clang_cc1 %s -E | FileCheck -strict-whitespace %s
-// Check for C99 6.10.3.4p2.
-
-#define f(a) f(x * (a)) 
-#define x 2 
-#define z z[0] 
-f(f(z)); 
-
-// CHECK: f(2 * (f(2 * (z[0]))));
-
diff --git a/test/Preprocessor/macro_disable4.c b/test/Preprocessor/macro_disable4.c
deleted file mode 100644 (file)
index 820858c..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// RUN: %clang_cc1 -P -E %s | grep 'int f(void)'
-// PR1820
-
-#define f(x) h(x
-#define h(x) x(void) 
-extern int f(f));