diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-26 17:46:33 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-26 17:46:33 +0000 |
commit | c7cf27f3cb7839d2bf65cf580db7b7d034196043 (patch) | |
tree | 6339a808da04c51d30d063a3e908b584c0e022a3 | |
parent | 86851109b8f70eee7a743bc914219e4f0d8bf9f4 (diff) |
merge all the macro disable tests by using filecheck.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99625 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/Preprocessor/macro_disable.c | 28 | ||||
-rw-r--r-- | test/Preprocessor/macro_disable2.c | 8 | ||||
-rw-r--r-- | test/Preprocessor/macro_disable3.c | 10 | ||||
-rw-r--r-- | test/Preprocessor/macro_disable4.c | 6 |
4 files changed, 26 insertions, 26 deletions
diff --git a/test/Preprocessor/macro_disable.c b/test/Preprocessor/macro_disable.c index d6509c35bf..95f4784398 100644 --- a/test/Preprocessor/macro_disable.c +++ b/test/Preprocessor/macro_disable.c @@ -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 index 229cf3264b..0000000000 --- a/test/Preprocessor/macro_disable2.c +++ /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 index eab0a5e046..0000000000 --- a/test/Preprocessor/macro_disable3.c +++ /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 index 820858c37f..0000000000 --- a/test/Preprocessor/macro_disable4.c +++ /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)); |