[cfe-commits] r99625 - in /cfe/trunk/test/Preprocessor: macro_disable.c macro_disable2.c macro_disable3.c macro_disable4.c

Chris Lattner sabre at nondot.org
Fri Mar 26 10:46:34 PDT 2010


Author: lattner
Date: Fri Mar 26 12:46:33 2010
New Revision: 99625

URL: http://llvm.org/viewvc/llvm-project?rev=99625&view=rev
Log:
merge all the macro disable tests by using filecheck.

Removed:
    cfe/trunk/test/Preprocessor/macro_disable2.c
    cfe/trunk/test/Preprocessor/macro_disable3.c
    cfe/trunk/test/Preprocessor/macro_disable4.c
Modified:
    cfe/trunk/test/Preprocessor/macro_disable.c

Modified: cfe/trunk/test/Preprocessor/macro_disable.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/macro_disable.c?rev=99625&r1=99624&r2=99625&view=diff
==============================================================================
--- cfe/trunk/test/Preprocessor/macro_disable.c (original)
+++ cfe/trunk/test/Preprocessor/macro_disable.c Fri Mar 26 12:46:33 2010
@@ -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

Removed: cfe/trunk/test/Preprocessor/macro_disable2.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/macro_disable2.c?rev=99624&view=auto
==============================================================================
--- cfe/trunk/test/Preprocessor/macro_disable2.c (original)
+++ cfe/trunk/test/Preprocessor/macro_disable2.c (removed)
@@ -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 
-

Removed: cfe/trunk/test/Preprocessor/macro_disable3.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/macro_disable3.c?rev=99624&view=auto
==============================================================================
--- cfe/trunk/test/Preprocessor/macro_disable3.c (original)
+++ cfe/trunk/test/Preprocessor/macro_disable3.c (removed)
@@ -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]))));
-

Removed: cfe/trunk/test/Preprocessor/macro_disable4.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/macro_disable4.c?rev=99624&view=auto
==============================================================================
--- cfe/trunk/test/Preprocessor/macro_disable4.c (original)
+++ cfe/trunk/test/Preprocessor/macro_disable4.c (removed)
@@ -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));





More information about the cfe-commits mailing list