diff options
Diffstat (limited to 'test/PCH')
| -rw-r--r-- | test/PCH/asm.c | 4 | ||||
| -rw-r--r-- | test/PCH/attrs.c | 4 | ||||
| -rw-r--r-- | test/PCH/blocks.c | 4 | ||||
| -rw-r--r-- | test/PCH/builtins.c | 4 | ||||
| -rw-r--r-- | test/PCH/enum.c | 4 | ||||
| -rw-r--r-- | test/PCH/exprs.c | 4 | ||||
| -rw-r--r-- | test/PCH/ext_vector.c | 4 | ||||
| -rw-r--r-- | test/PCH/external-defs.c | 14 | ||||
| -rw-r--r-- | test/PCH/functions.c | 4 | ||||
| -rw-r--r-- | test/PCH/fuzzy-pch.c | 6 | ||||
| -rw-r--r-- | test/PCH/line-directive.c | 4 | ||||
| -rw-r--r-- | test/PCH/method_pool.m | 4 | ||||
| -rw-r--r-- | test/PCH/multiple_decls.c | 4 | ||||
| -rw-r--r-- | test/PCH/nonvisible-external-defs.c | 4 | ||||
| -rw-r--r-- | test/PCH/objc_exprs.m | 4 | ||||
| -rw-r--r-- | test/PCH/objc_import.m | 4 | ||||
| -rw-r--r-- | test/PCH/objc_methods.m | 4 | ||||
| -rw-r--r-- | test/PCH/objc_property.m | 4 | ||||
| -rw-r--r-- | test/PCH/pr4489.c | 4 | ||||
| -rw-r--r-- | test/PCH/preprocess.c | 11 | ||||
| -rw-r--r-- | test/PCH/reloc.c | 4 | ||||
| -rw-r--r-- | test/PCH/stmts.c | 4 | ||||
| -rw-r--r-- | test/PCH/struct.c | 4 | ||||
| -rw-r--r-- | test/PCH/tentative-defs.c | 6 | ||||
| -rw-r--r-- | test/PCH/types.c | 4 | ||||
| -rw-r--r-- | test/PCH/va_arg.c | 4 | ||||
| -rw-r--r-- | test/PCH/variables.c | 4 |
27 files changed, 66 insertions, 63 deletions
diff --git a/test/PCH/asm.c b/test/PCH/asm.c index bff271de0390e..61665d607f418 100644 --- a/test/PCH/asm.c +++ b/test/PCH/asm.c @@ -1,8 +1,8 @@ // Test this without pch. -// RUN: clang-cc -triple i386-unknown-unknown -include %S/asm.h -fsyntax-only -verify %s && +// RUN: clang-cc -triple i386-unknown-unknown -include %S/asm.h -fsyntax-only -verify %s // Test with pch. -// RUN: clang-cc -triple i386-unknown-unknown -emit-pch -o %t %S/asm.h && +// RUN: clang-cc -triple i386-unknown-unknown -emit-pch -o %t %S/asm.h // RUN: clang-cc -triple i386-unknown-unknown -include-pch %t -fsyntax-only -verify %s diff --git a/test/PCH/attrs.c b/test/PCH/attrs.c index 1ffb467f63dbf..f381f23704069 100644 --- a/test/PCH/attrs.c +++ b/test/PCH/attrs.c @@ -1,8 +1,8 @@ // Test this without pch. -// RUN: clang-cc -include %S/attrs.h -fsyntax-only -verify %s && +// RUN: clang-cc -include %S/attrs.h -fsyntax-only -verify %s // Test with pch. -// RUN: clang-cc -emit-pch -o %t %S/attrs.h && +// RUN: clang-cc -emit-pch -o %t %S/attrs.h // RUN: clang-cc -include-pch %t -fsyntax-only -verify %s // expected-note{{previous overload}} double f(double); // expected-error{{overloadable}} diff --git a/test/PCH/blocks.c b/test/PCH/blocks.c index f3efc8ac4bccf..ccecd36523509 100644 --- a/test/PCH/blocks.c +++ b/test/PCH/blocks.c @@ -1,8 +1,8 @@ // Test this without pch. -// RUN: clang-cc -fblocks -include %S/blocks.h -fsyntax-only -emit-llvm -o - %s && +// RUN: clang-cc -fblocks -include %S/blocks.h -fsyntax-only -emit-llvm -o - %s // Test with pch. -// RUN: clang-cc -emit-pch -fblocks -o %t %S/blocks.h && +// RUN: clang-cc -emit-pch -fblocks -o %t %S/blocks.h // RUN: clang-cc -fblocks -include-pch %t -fsyntax-only -emit-llvm -o - %s int do_add(int x, int y) { return add(x, y); } diff --git a/test/PCH/builtins.c b/test/PCH/builtins.c index 3d1786ba77132..796b9dcda12c6 100644 --- a/test/PCH/builtins.c +++ b/test/PCH/builtins.c @@ -1,8 +1,8 @@ // Test this without pch. -// RUN: clang-cc -include %S/builtins.h -fsyntax-only -verify %s && +// RUN: clang-cc -include %S/builtins.h -fsyntax-only -verify %s // Test with pch. -// RUN: clang-cc -emit-pch -o %t %S/builtins.h && +// RUN: clang-cc -emit-pch -o %t %S/builtins.h // RUN: clang-cc -include-pch %t -fsyntax-only -verify %s void hello() { diff --git a/test/PCH/enum.c b/test/PCH/enum.c index 45b0491c6f531..607de59a8aeac 100644 --- a/test/PCH/enum.c +++ b/test/PCH/enum.c @@ -1,8 +1,8 @@ // Test this without pch. -// RUN: clang-cc -include %S/enum.h -fsyntax-only -verify %s && +// RUN: clang-cc -include %S/enum.h -fsyntax-only -verify %s // Test with pch. -// RUN: clang-cc -emit-pch -o %t %S/enum.h && +// RUN: clang-cc -emit-pch -o %t %S/enum.h // RUN: clang-cc -include-pch %t -fsyntax-only -verify %s int i = Red; diff --git a/test/PCH/exprs.c b/test/PCH/exprs.c index c8e6d1dc30300..6cd1ee71b4c39 100644 --- a/test/PCH/exprs.c +++ b/test/PCH/exprs.c @@ -1,8 +1,8 @@ // Test this without pch. -// RUN: clang-cc -fblocks -include %S/exprs.h -fsyntax-only -verify %s && +// RUN: clang-cc -fblocks -include %S/exprs.h -fsyntax-only -verify %s // Test with pch. -// RUN: clang-cc -emit-pch -fblocks -o %t %S/exprs.h && +// RUN: clang-cc -emit-pch -fblocks -o %t %S/exprs.h // RUN: clang-cc -fblocks -include-pch %t -fsyntax-only -verify %s int integer; diff --git a/test/PCH/ext_vector.c b/test/PCH/ext_vector.c index 4b5c25980e56a..314dbfcf16921 100644 --- a/test/PCH/ext_vector.c +++ b/test/PCH/ext_vector.c @@ -1,8 +1,8 @@ // Test this without pch. -// RUN: clang-cc -include %S/ext_vector.h -fsyntax-only -verify %s && +// RUN: clang-cc -include %S/ext_vector.h -fsyntax-only -verify %s // Test with pch. -// RUN: clang-cc -emit-pch -o %t %S/ext_vector.h && +// RUN: clang-cc -emit-pch -o %t %S/ext_vector.h // RUN: clang-cc -include-pch %t -fsyntax-only -verify %s int test(float4 f4) { diff --git a/test/PCH/external-defs.c b/test/PCH/external-defs.c index b7eb700e6b3ea..447124cc3f783 100644 --- a/test/PCH/external-defs.c +++ b/test/PCH/external-defs.c @@ -1,15 +1,15 @@ // Test with pch. -// RUN: clang-cc -triple x86_64-apple-darwin9 -emit-pch -o %t.pch %S/external-defs.h && -// RUN: clang-cc -triple x86_64-apple-darwin9 -include-pch %t.pch -emit-llvm -o %t %s && +// RUN: clang-cc -triple x86_64-apple-darwin9 -emit-pch -o %t.pch %S/external-defs.h +// RUN: clang-cc -triple x86_64-apple-darwin9 -include-pch %t.pch -emit-llvm -o %t %s -// RUN: grep "@x = common global i32 0" %t | count 1 && -// RUN: grep "@z" %t | count 0 && +// RUN: grep "@x = common global i32 0" %t | count 1 +// RUN: grep "@z" %t | count 0 -// RUN: grep "@x2 = global i32 19" %t | count 1 && +// RUN: grep "@x2 = global i32 19" %t | count 1 int x2 = 19; -// RUN: grep "@incomplete_array = common global .*1 x i32" %t | count 1 && -// RUN: grep "@incomplete_array2 = common global .*17 x i32" %t | count 1 && +// RUN: grep "@incomplete_array = common global .*1 x i32" %t | count 1 +// RUN: grep "@incomplete_array2 = common global .*17 x i32" %t | count 1 int incomplete_array2[17]; // RUN: grep "@incomplete_array3 = common global .*1 x i32" %t | count 1 int incomplete_array3[]; diff --git a/test/PCH/functions.c b/test/PCH/functions.c index 6d3c5a0f7b818..2121b9aaa107f 100644 --- a/test/PCH/functions.c +++ b/test/PCH/functions.c @@ -1,8 +1,8 @@ // Test this without pch. -// RUN: clang-cc -include %S/functions.h -fsyntax-only -verify %s && +// RUN: clang-cc -include %S/functions.h -fsyntax-only -verify %s // Test with pch. -// RUN: clang-cc -emit-pch -o %t %S/functions.h && +// RUN: clang-cc -emit-pch -o %t %S/functions.h // RUN: clang-cc -include-pch %t -fsyntax-only -verify %s int f0(int x0, int y0, ...) { return x0 + y0; } diff --git a/test/PCH/fuzzy-pch.c b/test/PCH/fuzzy-pch.c index 2ddcb8bb089bd..b29638bb0b10d 100644 --- a/test/PCH/fuzzy-pch.c +++ b/test/PCH/fuzzy-pch.c @@ -1,7 +1,7 @@ // Test with pch. -// RUN: clang-cc -emit-pch -DFOO -o %t %S/variables.h && -// RUN: clang-cc -DBAR=int -include-pch %t -fsyntax-only -pedantic %s && -// RUN: clang-cc -DFOO -DBAR=int -include-pch %t -Werror %s && +// RUN: clang-cc -emit-pch -DFOO -o %t %S/variables.h +// RUN: clang-cc -DBAR=int -include-pch %t -fsyntax-only -pedantic %s +// RUN: clang-cc -DFOO -DBAR=int -include-pch %t -Werror %s // RUN: not clang-cc -DFOO -DBAR=int -DX=5 -include-pch %t -Werror %s BAR bar = 17; diff --git a/test/PCH/line-directive.c b/test/PCH/line-directive.c index 53edb3c06b8ce..9eed4f4a98234 100644 --- a/test/PCH/line-directive.c +++ b/test/PCH/line-directive.c @@ -1,8 +1,8 @@ // Test this without pch. -// RUN: clang-cc -include %S/line-directive.h -fsyntax-only %s 2>&1|grep "25:5" && +// RUN: clang-cc -include %S/line-directive.h -fsyntax-only %s 2>&1|grep "25:5" // Test with pch. -// RUN: clang-cc -emit-pch -o %t %S/line-directive.h && +// RUN: clang-cc -emit-pch -o %t %S/line-directive.h // RUN: clang-cc -include-pch %t -fsyntax-only %s 2>&1|grep "25:5" double x; // expected-error{{redefinition of 'x' with a different type}} diff --git a/test/PCH/method_pool.m b/test/PCH/method_pool.m index 8dd7834f1dabd..3fe45a66a47da 100644 --- a/test/PCH/method_pool.m +++ b/test/PCH/method_pool.m @@ -1,8 +1,8 @@ // Test this without pch. -// RUN: clang-cc -include %S/method_pool.h -fsyntax-only -verify %s && +// RUN: clang-cc -include %S/method_pool.h -fsyntax-only -verify %s // Test with pch. -// RUN: clang-cc -x=objective-c -emit-pch -o %t %S/method_pool.h && +// RUN: clang-cc -x=objective-c -emit-pch -o %t %S/method_pool.h // RUN: clang-cc -include-pch %t -fsyntax-only -verify %s int message_id(id x) { diff --git a/test/PCH/multiple_decls.c b/test/PCH/multiple_decls.c index 4b2fc6247ce76..2702cd61bba6e 100644 --- a/test/PCH/multiple_decls.c +++ b/test/PCH/multiple_decls.c @@ -1,8 +1,8 @@ // Test this without pch. -// RUN: clang-cc -include %S/multiple_decls.h -fsyntax-only -ast-print -o - %s && +// RUN: clang-cc -include %S/multiple_decls.h -fsyntax-only -ast-print -o - %s // Test with pch. -// RUN: clang-cc -emit-pch -o %t %S/multiple_decls.h && +// RUN: clang-cc -emit-pch -o %t %S/multiple_decls.h // RUN: clang-cc -include-pch %t -fsyntax-only -ast-print -o - %s void f0(char c) { diff --git a/test/PCH/nonvisible-external-defs.c b/test/PCH/nonvisible-external-defs.c index bfe5ccab20a34..a78674985c980 100644 --- a/test/PCH/nonvisible-external-defs.c +++ b/test/PCH/nonvisible-external-defs.c @@ -1,8 +1,8 @@ // Test this without pch. -// RUN: clang-cc -include %S/nonvisible-external-defs.h -fsyntax-only -verify %s && +// RUN: clang-cc -include %S/nonvisible-external-defs.h -fsyntax-only -verify %s // Test with pch. -// RUN: clang-cc -emit-pch -o %t %S/nonvisible-external-defs.h && +// RUN: clang-cc -emit-pch -o %t %S/nonvisible-external-defs.h // RUN: clang-cc -include-pch %t -fsyntax-only -verify %s int g(int, float); // expected-error{{conflicting types}} diff --git a/test/PCH/objc_exprs.m b/test/PCH/objc_exprs.m index 48966f36f33ad..9eb5a113a2470 100644 --- a/test/PCH/objc_exprs.m +++ b/test/PCH/objc_exprs.m @@ -1,8 +1,8 @@ // Test this without pch. -// RUN: clang-cc -fblocks -include %S/objc_exprs.h -fsyntax-only -verify %s && +// RUN: clang-cc -fblocks -include %S/objc_exprs.h -fsyntax-only -verify %s // Test with pch. -// RUN: clang-cc -x objective-c-header -emit-pch -fblocks -o %t %S/objc_exprs.h && +// RUN: clang-cc -x objective-c-header -emit-pch -fblocks -o %t %S/objc_exprs.h // RUN: clang-cc -fblocks -include-pch %t -fsyntax-only -verify %s // Expressions diff --git a/test/PCH/objc_import.m b/test/PCH/objc_import.m index 86c1c25ae5c90..83f389c4ca90c 100644 --- a/test/PCH/objc_import.m +++ b/test/PCH/objc_import.m @@ -1,8 +1,8 @@ // Test this without pch. -// RUN: clang-cc -include %S/objc_import.h -fsyntax-only -verify %s && +// RUN: clang-cc -include %S/objc_import.h -fsyntax-only -verify %s // Test with pch. -// RUN: clang-cc -x=objective-c -emit-pch -o %t %S/objc_import.h && +// RUN: clang-cc -x=objective-c -emit-pch -o %t %S/objc_import.h // RUN: clang-cc -include-pch %t -fsyntax-only -verify %s #import "objc_import.h" diff --git a/test/PCH/objc_methods.m b/test/PCH/objc_methods.m index 1a198b18d380d..aff34d114f025 100644 --- a/test/PCH/objc_methods.m +++ b/test/PCH/objc_methods.m @@ -1,8 +1,8 @@ // Test this without pch. -// RUN: clang-cc -include %S/objc_methods.h -fsyntax-only -verify %s && +// RUN: clang-cc -include %S/objc_methods.h -fsyntax-only -verify %s // Test with pch. -// RUN: clang-cc -x=objective-c -emit-pch -o %t %S/objc_methods.h && +// RUN: clang-cc -x=objective-c -emit-pch -o %t %S/objc_methods.h // RUN: clang-cc -include-pch %t -fsyntax-only -verify %s void func() { diff --git a/test/PCH/objc_property.m b/test/PCH/objc_property.m index 5cf6de7593756..a1d3eb99ceb52 100644 --- a/test/PCH/objc_property.m +++ b/test/PCH/objc_property.m @@ -1,8 +1,8 @@ // Test this without pch. -// RUN: clang-cc -include %S/objc_property.h -fsyntax-only -verify %s && +// RUN: clang-cc -include %S/objc_property.h -fsyntax-only -verify %s // Test with pch. -// RUN: clang-cc -x=objective-c -emit-pch -o %t %S/objc_property.h && +// RUN: clang-cc -x=objective-c -emit-pch -o %t %S/objc_property.h // RUN: clang-cc -include-pch %t -fsyntax-only -verify %s void func() { diff --git a/test/PCH/pr4489.c b/test/PCH/pr4489.c index d05d5cd7ddab1..aaf5aac749e54 100644 --- a/test/PCH/pr4489.c +++ b/test/PCH/pr4489.c @@ -1,5 +1,5 @@ -// RUN: clang -x c-header -o %t.pch %s && -// RUN: echo > %t.empty.c && +// RUN: clang -x c-header -o %t.pch %s +// RUN: echo > %t.empty.c // RUN: clang -include %t -x c %t.empty.c -emit-llvm -S -o - // PR 4489: Crash with PCH // PR 4492: Crash with PCH (round two) diff --git a/test/PCH/preprocess.c b/test/PCH/preprocess.c index 128cc0acb9736..7a6c2c5a4e2bc 100644 --- a/test/PCH/preprocess.c +++ b/test/PCH/preprocess.c @@ -1,5 +1,8 @@ -// RUN: clang-cc -emit-pch -o %t %S/preprocess.h && -// RUN: clang-cc -include-pch %t -E -o - %s | grep -c "a_typedef" | count 1 -#include "preprocess.h" +// Check that -E mode is invariant when using an implicit PCH. -int a_value; +// RUN: clang-cc -include %S/preprocess.h -E -o %t.orig %s +// RUN: clang-cc -emit-pch -o %t %S/preprocess.h +// RUN: clang-cc -include-pch %t -E -o %t.from_pch %s +// RUN: diff %t.orig %t.from_pch + +a_typedef a_value; diff --git a/test/PCH/reloc.c b/test/PCH/reloc.c index b08187fdb8d8d..36247d50296e1 100644 --- a/test/PCH/reloc.c +++ b/test/PCH/reloc.c @@ -1,5 +1,5 @@ -// RUN: clang-cc -emit-pch -o %t --relocatable-pch -isysroot %S/libroot %S/libroot/usr/include/reloc.h && -// RUN: clang-cc -include-pch %t -isysroot %S/libroot %s -verify && +// RUN: clang-cc -emit-pch -o %t --relocatable-pch -isysroot %S/libroot %S/libroot/usr/include/reloc.h +// RUN: clang-cc -include-pch %t -isysroot %S/libroot %s -verify // RUN: not clang-cc -include-pch %t %s #include <reloc.h> diff --git a/test/PCH/stmts.c b/test/PCH/stmts.c index 0d906f291f2c1..69c7ec7dbf49e 100644 --- a/test/PCH/stmts.c +++ b/test/PCH/stmts.c @@ -1,8 +1,8 @@ // Test this without pch. -// RUN: clang-cc -include %S/stmts.h -fsyntax-only -emit-llvm -o - %s && +// RUN: clang-cc -include %S/stmts.h -fsyntax-only -emit-llvm -o - %s // Test with pch. -// RUN: clang-cc -emit-pch -o %t %S/stmts.h && +// RUN: clang-cc -emit-pch -o %t %S/stmts.h // RUN: clang-cc -include-pch %t -fsyntax-only -emit-llvm -o - %s void g0(void) { f0(5); } diff --git a/test/PCH/struct.c b/test/PCH/struct.c index f1e28115d0d7e..6595a2fbdccc6 100644 --- a/test/PCH/struct.c +++ b/test/PCH/struct.c @@ -1,8 +1,8 @@ // Test this without pch. -// RUN: clang-cc -include %S/struct.h -fsyntax-only -verify %s && +// RUN: clang-cc -include %S/struct.h -fsyntax-only -verify %s // Test with pch. -// RUN: clang-cc -emit-pch -o %t %S/struct.h && +// RUN: clang-cc -emit-pch -o %t %S/struct.h // RUN: clang-cc -include-pch %t -fsyntax-only -verify %s struct Point *p1; diff --git a/test/PCH/tentative-defs.c b/test/PCH/tentative-defs.c index 980cfab0834bb..5b85fccbcacd2 100644 --- a/test/PCH/tentative-defs.c +++ b/test/PCH/tentative-defs.c @@ -1,8 +1,8 @@ // Test with pch. -// RUN: clang-cc -triple x86_64-apple-darwin9 -emit-pch -o %t.pch %S/tentative-defs.h && -// RUN: clang-cc -triple x86_64-apple-darwin9 -include-pch %t.pch -verify -emit-llvm -o %t %s && +// RUN: clang-cc -triple x86_64-apple-darwin9 -emit-pch -o %t.pch %S/tentative-defs.h +// RUN: clang-cc -triple x86_64-apple-darwin9 -include-pch %t.pch -verify -emit-llvm -o %t %s -// RUN: grep "@variable = common global i32 0" %t | count 1 && +// RUN: grep "@variable = common global i32 0" %t | count 1 // RUN: grep "@incomplete_array = common global .*1 x i32" %t | count 1 diff --git a/test/PCH/types.c b/test/PCH/types.c index c111c9ea74592..a7efaef9a2c4f 100644 --- a/test/PCH/types.c +++ b/test/PCH/types.c @@ -1,8 +1,8 @@ // Test this without pch. -// RUN: clang-cc -fblocks -include %S/types.h -fsyntax-only -verify %s && +// RUN: clang-cc -fblocks -include %S/types.h -fsyntax-only -verify %s // Test with pch. -// RUN: clang-cc -emit-pch -fblocks -o %t %S/types.h && +// RUN: clang-cc -emit-pch -fblocks -o %t %S/types.h // RUN: clang-cc -fblocks -include-pch %t -fsyntax-only -verify %s typedef int INT; diff --git a/test/PCH/va_arg.c b/test/PCH/va_arg.c index 75cee06d656fc..6f7ccf4561857 100644 --- a/test/PCH/va_arg.c +++ b/test/PCH/va_arg.c @@ -1,8 +1,8 @@ // Test this without pch. -// RUN: clang-cc -triple=x86_64-unknown-freebsd7.0 -include %S/va_arg.h %s -emit-llvm -o - && +// RUN: clang-cc -triple=x86_64-unknown-freebsd7.0 -include %S/va_arg.h %s -emit-llvm -o - // Test with pch. -// RUN: clang-cc -triple=x86_64-unknown-freebsd7.0 -emit-pch -o %t %S/va_arg.h && +// RUN: clang-cc -triple=x86_64-unknown-freebsd7.0 -emit-pch -o %t %S/va_arg.h // RUN: clang-cc -triple=x86_64-unknown-freebsd7.0 -include-pch %t %s -emit-llvm -o - char *g0(char** argv, int argc) { return argv[argc]; } diff --git a/test/PCH/variables.c b/test/PCH/variables.c index c988a59ce6051..f79b68483fd99 100644 --- a/test/PCH/variables.c +++ b/test/PCH/variables.c @@ -1,8 +1,8 @@ // Test this without pch. -// RUN: clang-cc -include %S/variables.h -fsyntax-only -verify %s && +// RUN: clang-cc -include %S/variables.h -fsyntax-only -verify %s // Test with pch. -// RUN: clang-cc -emit-pch -o %t %S/variables.h && +// RUN: clang-cc -emit-pch -o %t %S/variables.h // RUN: clang-cc -include-pch %t -fsyntax-only -verify %s int *ip2 = &x; |
