diff options
Diffstat (limited to 'clang/test/Index')
| -rw-r--r-- | clang/test/Index/c-index-api-test.m | 2 | ||||
| -rw-r--r-- | clang/test/Index/c-index-pch.c | 6 | ||||
| -rw-r--r-- | clang/test/Index/comments.c | 18 | ||||
| -rw-r--r-- | clang/test/Index/find-decls.c | 34 | ||||
| -rw-r--r-- | clang/test/Index/find-defs.c | 26 | ||||
| -rw-r--r-- | clang/test/Index/find-refs.c | 80 | ||||
| -rw-r--r-- | clang/test/Index/multiple-redecls.c | 4 | ||||
| -rw-r--r-- | clang/test/Index/objc-decls.m | 24 | ||||
| -rw-r--r-- | clang/test/Index/objc-message.m | 60 | ||||
| -rw-r--r-- | clang/test/Index/resolve-loc.c | 32 |
10 files changed, 143 insertions, 143 deletions
diff --git a/clang/test/Index/c-index-api-test.m b/clang/test/Index/c-index-api-test.m index 20d4d7b45af..55669e7579c 100644 --- a/clang/test/Index/c-index-api-test.m +++ b/clang/test/Index/c-index-api-test.m @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple x86_64-apple-darwin10 -emit-pch -x objective-c %s -o %t.ast && +// RUN: clang-cc -triple x86_64-apple-darwin10 -emit-pch -x objective-c %s -o %t.ast // RUN: c-index-test %t.ast all | FileCheck %s // CHECK: <invalid loc>:0:0: TypedefDecl=__int128_t:0:0 [Context=c-index-api-test.m] diff --git a/clang/test/Index/c-index-pch.c b/clang/test/Index/c-index-pch.c index aae4eb3669f..789325d76a3 100644 --- a/clang/test/Index/c-index-pch.c +++ b/clang/test/Index/c-index-pch.c @@ -1,6 +1,6 @@ -// RUN: clang-cc -emit-pch -x c -o %t.pch %S/c-index-pch.h && -// RUN: clang-cc -include-pch %t.pch -x c -emit-pch -o %t.ast %s && -// RUN: c-index-test %t.ast all | FileCheck -check-prefix=ALL %s && +// RUN: clang-cc -emit-pch -x c -o %t.pch %S/c-index-pch.h +// RUN: clang-cc -include-pch %t.pch -x c -emit-pch -o %t.ast %s +// RUN: c-index-test %t.ast all | FileCheck -check-prefix=ALL %s // RUN: c-index-test %t.ast local | FileCheck -check-prefix=LOCAL %s // ALL: FunctionDecl=foo // ALL: VarDecl=bar diff --git a/clang/test/Index/comments.c b/clang/test/Index/comments.c index 689ce88e221..83bdbf6eed7 100644 --- a/clang/test/Index/comments.c +++ b/clang/test/Index/comments.c @@ -19,16 +19,16 @@ void g(int); void h(int); ///< This is a member comment. -// RUN: clang-cc -emit-pch -o %t.ast %s && +// RUN: clang-cc -emit-pch -o %t.ast %s -// RUN: index-test %t.ast -point-at %s:11:6 > %t && -// RUN: grep "starts here" %t && -// RUN: grep "block comment" %t && +// RUN: index-test %t.ast -point-at %s:11:6 > %t +// RUN: grep "starts here" %t +// RUN: grep "block comment" %t -// RUN: index-test %t.ast -point-at %s:17:6 > %t && -// RUN: grep "BCPL" %t && -// RUN: grep "But" %t && +// RUN: index-test %t.ast -point-at %s:17:6 > %t +// RUN: grep "BCPL" %t +// RUN: grep "But" %t -// RUN: index-test %t.ast -point-at %s:19:6 > %t && -// RUN: grep "NOT" %t | count 0 && +// RUN: index-test %t.ast -point-at %s:19:6 > %t +// RUN: grep "NOT" %t | count 0 // RUN: grep "member" %t diff --git a/clang/test/Index/find-decls.c b/clang/test/Index/find-decls.c index 50a233d75ba..06c9a408c5c 100644 --- a/clang/test/Index/find-decls.c +++ b/clang/test/Index/find-decls.c @@ -1,25 +1,25 @@ -// RUN: clang-cc -fblocks -emit-pch %S/t1.c -o %t1.ast && -// RUN: clang-cc -fblocks -emit-pch %S/t2.c -o %t2.ast && +// RUN: clang-cc -fblocks -emit-pch %S/t1.c -o %t1.ast +// RUN: clang-cc -fblocks -emit-pch %S/t2.c -o %t2.ast -// RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:8:7 -print-decls > %t && -// RUN: cat %t | count 3 && -// RUN: grep 'foo.h:4:6,' %t | count 2 && -// RUN: grep 't2.c:5:6,' %t && +// RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:8:7 -print-decls > %t +// RUN: cat %t | count 3 +// RUN: grep 'foo.h:4:6,' %t | count 2 +// RUN: grep 't2.c:5:6,' %t -// RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:5:47 -print-decls > %t && -// RUN: cat %t | count 1 && -// RUN: grep 't1.c:5:12,' %t && +// RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:5:47 -print-decls > %t +// RUN: cat %t | count 1 +// RUN: grep 't1.c:5:12,' %t -// RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:6:20 -print-decls > %t && -// RUN: cat %t | count 1 && -// RUN: grep 't1.c:3:19,' %t && +// RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:6:20 -print-decls > %t +// RUN: cat %t | count 1 +// RUN: grep 't1.c:3:19,' %t // field test -// RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:21:6 -print-decls > %t && -// RUN: cat %t | count 1 && -// RUN: grep 't1.c:12:7,' %t && +// RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:21:6 -print-decls > %t +// RUN: cat %t | count 1 +// RUN: grep 't1.c:12:7,' %t -// RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:22:21 -print-decls > %t && -// RUN: cat %t | count 1 && +// RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:22:21 -print-decls > %t +// RUN: cat %t | count 1 // RUN: grep 't1.c:16:7,' %t diff --git a/clang/test/Index/find-defs.c b/clang/test/Index/find-defs.c index 0e63ae76004..1a1af579c01 100644 --- a/clang/test/Index/find-defs.c +++ b/clang/test/Index/find-defs.c @@ -1,18 +1,18 @@ -// RUN: clang-cc -fblocks -emit-pch %S/t1.c -o %t1.ast && -// RUN: clang-cc -fblocks -emit-pch %S/t2.c -o %t2.ast && +// RUN: clang-cc -fblocks -emit-pch %S/t1.c -o %t1.ast +// RUN: clang-cc -fblocks -emit-pch %S/t2.c -o %t2.ast -// RUN: index-test %t1.ast %t2.ast -point-at %S/foo.h:1:14 -print-defs > %t && -// RUN: cat %t | count 1 && -// RUN: grep 't2.c:3:5,' %t && +// RUN: index-test %t1.ast %t2.ast -point-at %S/foo.h:1:14 -print-defs > %t +// RUN: cat %t | count 1 +// RUN: grep 't2.c:3:5,' %t -// RUN: index-test %t1.ast %t2.ast -point-at %S/foo.h:3:9 -print-defs > %t && -// RUN: cat %t | count 1 && -// RUN: grep 't1.c:3:6,' %t && +// RUN: index-test %t1.ast %t2.ast -point-at %S/foo.h:3:9 -print-defs > %t +// RUN: cat %t | count 1 +// RUN: grep 't1.c:3:6,' %t -// RUN: index-test %t1.ast %t2.ast -point-at %S/foo.h:4:9 -print-defs > %t && -// RUN: cat %t | count 1 && -// RUN: grep 't2.c:5:6,' %t && +// RUN: index-test %t1.ast %t2.ast -point-at %S/foo.h:4:9 -print-defs > %t +// RUN: cat %t | count 1 +// RUN: grep 't2.c:5:6,' %t -// RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:8:7 -print-defs > %t && -// RUN: cat %t | count 1 && +// RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:8:7 -print-defs > %t +// RUN: cat %t | count 1 // RUN: grep 't2.c:5:6,' %t diff --git a/clang/test/Index/find-refs.c b/clang/test/Index/find-refs.c index 1b58b375277..8afcd0965a1 100644 --- a/clang/test/Index/find-refs.c +++ b/clang/test/Index/find-refs.c @@ -1,47 +1,47 @@ -// RUN: clang-cc -fblocks -emit-pch %S/t1.c -o %t1.ast && -// RUN: clang-cc -fblocks -emit-pch %S/t2.c -o %t2.ast && - -// RUN: index-test %t1.ast %t2.ast -point-at %S/foo.h:1:14 -print-refs > %t && -// RUN: cat %t | count 4 && -// RUN: grep 't1.c:4:19,' %t && -// RUN: grep 't1.c:28:40,' %t && -// RUN: grep 't2.c:6:3,' %t && -// RUN: grep 't2.c:7:12,' %t && - -// RUN: index-test %t1.ast %t2.ast -point-at %S/foo.h:3:9 -print-refs > %t && -// RUN: cat %t | count 1 && -// RUN: grep 't2.c:7:3,' %t && - -// RUN: index-test %t1.ast %t2.ast -point-at %S/foo.h:4:9 -print-refs > %t && -// RUN: cat %t | count 1 && -// RUN: grep 't1.c:8:3,' %t && - -// RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:3:22 -print-refs > %t && -// RUN: cat %t | count 1 && -// RUN: grep 't1.c:6:17,' %t && - -// RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:4:11 -print-refs > %t && -// RUN: cat %t | count 1 && -// RUN: grep 't1.c:6:5,' %t && - -// RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:5:30 -print-refs > %t && -// RUN: cat %t | count 3 && -// RUN: grep 't1.c:5:27,' %t && -// RUN: grep 't1.c:5:44,' %t && -// RUN: grep 't1.c:6:26,' %t && +// RUN: clang-cc -fblocks -emit-pch %S/t1.c -o %t1.ast +// RUN: clang-cc -fblocks -emit-pch %S/t2.c -o %t2.ast + +// RUN: index-test %t1.ast %t2.ast -point-at %S/foo.h:1:14 -print-refs > %t +// RUN: cat %t | count 4 +// RUN: grep 't1.c:4:19,' %t +// RUN: grep 't1.c:28:40,' %t +// RUN: grep 't2.c:6:3,' %t +// RUN: grep 't2.c:7:12,' %t + +// RUN: index-test %t1.ast %t2.ast -point-at %S/foo.h:3:9 -print-refs > %t +// RUN: cat %t | count 1 +// RUN: grep 't2.c:7:3,' %t + +// RUN: index-test %t1.ast %t2.ast -point-at %S/foo.h:4:9 -print-refs > %t +// RUN: cat %t | count 1 +// RUN: grep 't1.c:8:3,' %t + +// RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:3:22 -print-refs > %t +// RUN: cat %t | count 1 +// RUN: grep 't1.c:6:17,' %t + +// RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:4:11 -print-refs > %t +// RUN: cat %t | count 1 +// RUN: grep 't1.c:6:5,' %t + +// RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:5:30 -print-refs > %t +// RUN: cat %t | count 3 +// RUN: grep 't1.c:5:27,' %t +// RUN: grep 't1.c:5:44,' %t +// RUN: grep 't1.c:6:26,' %t // field test // FIXME: References point at the start of MemberExpr, make them point at the field instead. -// RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:12:7 -print-refs > %t && -// RUN: cat %t | count 1 && -// RUN: grep 't1.c:21:3,' %t && +// RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:12:7 -print-refs > %t +// RUN: cat %t | count 1 +// RUN: grep 't1.c:21:3,' %t -// RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:16:7 -print-refs > %t && -// RUN: cat %t | count 1 && -// RUN: grep 't1.c:22:3,' %t && +// RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:16:7 -print-refs > %t +// RUN: cat %t | count 1 +// RUN: grep 't1.c:22:3,' %t -// RUN: index-test %t1.ast %t2.ast -point-at %S/foo.h:7:11 -print-refs > %t && -// RUN: cat %t | count 2 && -// RUN: grep 't1.c:25:3,' %t && +// RUN: index-test %t1.ast %t2.ast -point-at %S/foo.h:7:11 -print-refs > %t +// RUN: cat %t | count 2 +// RUN: grep 't1.c:25:3,' %t // RUN: grep 't2.c:10:3,' %t diff --git a/clang/test/Index/multiple-redecls.c b/clang/test/Index/multiple-redecls.c index 6f1f75b02f3..ea6d00b6a3c 100644 --- a/clang/test/Index/multiple-redecls.c +++ b/clang/test/Index/multiple-redecls.c @@ -1,5 +1,5 @@ -// RUN: clang-cc -emit-pch %s -o %t.ast && -// RUN: index-test %t.ast -point-at %s:8:4 -print-decls | count 2 && +// RUN: clang-cc -emit-pch %s -o %t.ast +// RUN: index-test %t.ast -point-at %s:8:4 -print-decls | count 2 // RUN: index-test %t.ast -point-at %s:8:4 -print-defs | count 1 static void foo(int x); diff --git a/clang/test/Index/objc-decls.m b/clang/test/Index/objc-decls.m index 1a8ab4b5577..56051d52e3c 100644 --- a/clang/test/Index/objc-decls.m +++ b/clang/test/Index/objc-decls.m @@ -1,16 +1,16 @@ -// RUN: clang-cc -emit-pch %S/t1.m -o %t1.m.ast && -// RUN: clang-cc -emit-pch %S/t2.m -o %t2.m.ast && +// RUN: clang-cc -emit-pch %S/t1.m -o %t1.m.ast +// RUN: clang-cc -emit-pch %S/t2.m -o %t2.m.ast -// RUN: index-test %t1.m.ast %t2.m.ast -point-at %S/t1.m:12:12 -print-decls > %t && -// RUN: cat %t | count 2 && -// RUN: grep 'objc.h:2:9,' %t | count 2 && +// RUN: index-test %t1.m.ast %t2.m.ast -point-at %S/t1.m:12:12 -print-decls > %t +// RUN: cat %t | count 2 +// RUN: grep 'objc.h:2:9,' %t | count 2 -// RUN: index-test %t1.m.ast %t2.m.ast -point-at %S/objc.h:5:13 -print-decls > %t && -// RUN: cat %t | count 3 && -// RUN: grep 'objc.h:5:1,' %t | count 2 && -// RUN: grep 't1.m:15:1,' %t | count 1 && +// RUN: index-test %t1.m.ast %t2.m.ast -point-at %S/objc.h:5:13 -print-decls > %t +// RUN: cat %t | count 3 +// RUN: grep 'objc.h:5:1,' %t | count 2 +// RUN: grep 't1.m:15:1,' %t | count 1 -// RUN: index-test %t1.m.ast %t2.m.ast -point-at %S/objc.h:10:13 -print-decls > %t && -// RUN: cat %t | count 3 && -// RUN: grep 'objc.h:10:1,' %t | count 2 && +// RUN: index-test %t1.m.ast %t2.m.ast -point-at %S/objc.h:10:13 -print-decls > %t +// RUN: cat %t | count 3 +// RUN: grep 'objc.h:10:1,' %t | count 2 // RUN: grep 't2.m:11:1,' %t | count 1 diff --git a/clang/test/Index/objc-message.m b/clang/test/Index/objc-message.m index 45ce83876cf..9b709ccc0c9 100644 --- a/clang/test/Index/objc-message.m +++ b/clang/test/Index/objc-message.m @@ -1,38 +1,38 @@ -// RUN: clang-cc -emit-pch %S/t1.m -o %t1.m.ast && -// RUN: clang-cc -emit-pch %S/t2.m -o %t2.m.ast && +// RUN: clang-cc -emit-pch %S/t1.m -o %t1.m.ast +// RUN: clang-cc -emit-pch %S/t2.m -o %t2.m.ast -// RUN: index-test %t1.m.ast %t2.m.ast -point-at %S/objc.h:5:13 -print-refs > %t && -// RUN: cat %t | count 1 && -// RUN: grep 't1.m:6:3,' %t && +// RUN: index-test %t1.m.ast %t2.m.ast -point-at %S/objc.h:5:13 -print-refs > %t +// RUN: cat %t | count 1 +// RUN: grep 't1.m:6:3,' %t -// RUN: index-test %t1.m.ast %t2.m.ast -point-at %S/objc.h:6:13 -print-refs > %t && -// RUN: cat %t | count 2 && -// RUN: grep 't1.m:7:3,' %t && -// RUN: grep 't2.m:7:3,' %t && +// RUN: index-test %t1.m.ast %t2.m.ast -point-at %S/objc.h:6:13 -print-refs > %t +// RUN: cat %t | count 2 +// RUN: grep 't1.m:7:3,' %t +// RUN: grep 't2.m:7:3,' %t -// RUN: index-test %t1.m.ast %t2.m.ast -point-at %S/objc.h:10:13 -print-refs > %t && -// RUN: cat %t | count 2 && -// RUN: grep 't1.m:6:3,' %t && -// RUN: grep 't2.m:6:3,' %t && +// RUN: index-test %t1.m.ast %t2.m.ast -point-at %S/objc.h:10:13 -print-refs > %t +// RUN: cat %t | count 2 +// RUN: grep 't1.m:6:3,' %t +// RUN: grep 't2.m:6:3,' %t -// RUN: index-test %t1.m.ast %t2.m.ast -point-at %S/t1.m:6:15 -print-decls > %t && -// RUN: cat %t | count 6 && -// RUN: grep 'objc.h:5:1,' %t | count 2 && -// RUN: grep 'objc.h:10:1,' %t | count 2 && -// RUN: grep 't1.m:15:1,' %t && -// RUN: grep 't2.m:11:1,' %t && +// RUN: index-test %t1.m.ast %t2.m.ast -point-at %S/t1.m:6:15 -print-decls > %t +// RUN: cat %t | count 6 +// RUN: grep 'objc.h:5:1,' %t | count 2 +// RUN: grep 'objc.h:10:1,' %t | count 2 +// RUN: grep 't1.m:15:1,' %t +// RUN: grep 't2.m:11:1,' %t -// RUN: index-test %t1.m.ast %t2.m.ast -point-at %S/t1.m:7:15 -print-decls > %t && -// RUN: cat %t | count 3 && -// RUN: grep 'objc.h:6:1,' %t | count 2 && -// RUN: grep 't1.m:18:1,' %t && +// RUN: index-test %t1.m.ast %t2.m.ast -point-at %S/t1.m:7:15 -print-decls > %t +// RUN: cat %t | count 3 +// RUN: grep 'objc.h:6:1,' %t | count 2 +// RUN: grep 't1.m:18:1,' %t -// RUN: index-test %t2.m.ast %t1.m.ast -point-at %S/t2.m:6:15 -print-decls > %t && -// RUN: cat %t | count 3 && -// RUN: grep 'objc.h:10:1,' %t | count 2 && -// RUN: grep 't2.m:11:1,' %t && +// RUN: index-test %t2.m.ast %t1.m.ast -point-at %S/t2.m:6:15 -print-decls > %t +// RUN: cat %t | count 3 +// RUN: grep 'objc.h:10:1,' %t | count 2 +// RUN: grep 't2.m:11:1,' %t -// RUN: index-test %t2.m.ast %t1.m.ast -point-at %S/t2.m:7:15 -print-decls > %t && -// RUN: cat %t | count 3 && -// RUN: grep 'objc.h:6:1,' %t | count 2 && +// RUN: index-test %t2.m.ast %t1.m.ast -point-at %S/t2.m:7:15 -print-decls > %t +// RUN: cat %t | count 3 +// RUN: grep 'objc.h:6:1,' %t | count 2 // RUN: grep 't1.m:18:1,' %t diff --git a/clang/test/Index/resolve-loc.c b/clang/test/Index/resolve-loc.c index cae86f38dd6..f4697171ee1 100644 --- a/clang/test/Index/resolve-loc.c +++ b/clang/test/Index/resolve-loc.c @@ -16,22 +16,22 @@ struct S { }; -// RUN: clang-cc -emit-pch %s -o %t.ast && -// RUN: index-test %t.ast -point-at %s:3:8 | grep top_var && -// RUN: index-test %t.ast -point-at %s:5:15 | grep top_func_decl && -// RUN: index-test %t.ast -point-at %s:5:25 | grep param1 && -// RUN: index-test %t.ast -point-at %s:7:17 | grep top_func_def && -// RUN: index-test %t.ast -point-at %s:7:23 | grep param2 && -// RUN: index-test %t.ast -point-at %s:8:10 | grep local_var1 && -// RUN: index-test %t.ast -point-at %s:9:15 | grep for_var && - -// RUN: index-test %t.ast -point-at %s:9:43 > %t && -// RUN: grep '++for_var' %t && - -// RUN: index-test %t.ast -point-at %s:10:9 | grep local_var2 && - -// RUN: index-test %t.ast -point-at %s:10:30 > %t && -// RUN: grep 'for_var + 1' %t && +// RUN: clang-cc -emit-pch %s -o %t.ast +// RUN: index-test %t.ast -point-at %s:3:8 | grep top_var +// RUN: index-test %t.ast -point-at %s:5:15 | grep top_func_decl +// RUN: index-test %t.ast -point-at %s:5:25 | grep param1 +// RUN: index-test %t.ast -point-at %s:7:17 | grep top_func_def +// RUN: index-test %t.ast -point-at %s:7:23 | grep param2 +// RUN: index-test %t.ast -point-at %s:8:10 | grep local_var1 +// RUN: index-test %t.ast -point-at %s:9:15 | grep for_var + +// RUN: index-test %t.ast -point-at %s:9:43 > %t +// RUN: grep '++for_var' %t + +// RUN: index-test %t.ast -point-at %s:10:9 | grep local_var2 + +// RUN: index-test %t.ast -point-at %s:10:30 > %t +// RUN: grep 'for_var + 1' %t // fields test. // RUN: index-test %t.ast -point-at %s:15:10 | grep field_var |

