diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/Index/comments.c | 34 | ||||
-rw-r--r-- | test/Index/find-refs.c | 47 | ||||
-rw-r--r-- | test/Index/multiple-redecls.c | 12 | ||||
-rw-r--r-- | test/Index/objc-decls.m | 16 | ||||
-rw-r--r-- | test/Index/objc-message.m | 38 | ||||
-rw-r--r-- | test/Index/resolve-loc.c | 39 |
6 files changed, 0 insertions, 186 deletions
diff --git a/test/Index/comments.c b/test/Index/comments.c deleted file mode 100644 index 034317779c..0000000000 --- a/test/Index/comments.c +++ /dev/null @@ -1,34 +0,0 @@ -// Run lines are sensitive to line numbers and come below the code. - -//! It all starts here. -/*! It's a little odd to continue line this, - * - * but we need more multi-line comments. */ -/// This comment comes before my other comments -/** This is a block comment that is associated with the function f. It - * runs for three lines. - */ -void f(int, int); - -// NOT IN THE COMMENT -/// This is a BCPL comment that is associated with the function g. -/// It has only two lines. -/** But there are other blocks that are part of the comment, too. */ -void g(int); - -void h(int); ///< This is a member comment. - - -// RUN: %clang_cc1 -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: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: grep "member" %t diff --git a/test/Index/find-refs.c b/test/Index/find-refs.c deleted file mode 100644 index 1f29a77017..0000000000 --- a/test/Index/find-refs.c +++ /dev/null @@ -1,47 +0,0 @@ -// RUN: %clang_cc1 -fblocks -emit-pch %S/Inputs/t1.c -o %t1.ast -// RUN: %clang_cc1 -fblocks -emit-pch %S/Inputs/t2.c -o %t2.ast - -// RUN: index-test %t1.ast %t2.ast -point-at %S/Inputs/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/Inputs/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/Inputs/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/Inputs/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/Inputs/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/Inputs/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/Inputs/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/Inputs/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/Inputs/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/test/Index/multiple-redecls.c b/test/Index/multiple-redecls.c deleted file mode 100644 index faea88fc6b..0000000000 --- a/test/Index/multiple-redecls.c +++ /dev/null @@ -1,12 +0,0 @@ -// RUN: %clang_cc1 -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); - -static void bar(void) { - foo(10); -} - -void foo(int x) { -} diff --git a/test/Index/objc-decls.m b/test/Index/objc-decls.m deleted file mode 100644 index 4fcd830212..0000000000 --- a/test/Index/objc-decls.m +++ /dev/null @@ -1,16 +0,0 @@ -// RUN: %clang_cc1 -emit-pch %S/Inputs/t1.m -o %t1.m.ast -// RUN: %clang_cc1 -emit-pch %S/Inputs/t2.m -o %t2.m.ast - -// RUN: index-test %t1.m.ast %t2.m.ast -point-at %S/Inputs/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/Inputs/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/Inputs/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/test/Index/objc-message.m b/test/Index/objc-message.m deleted file mode 100644 index 151565b9bb..0000000000 --- a/test/Index/objc-message.m +++ /dev/null @@ -1,38 +0,0 @@ -// RUN: %clang_cc1 -emit-pch %S/Inputs/t1.m -o %t1.m.ast -// RUN: %clang_cc1 -emit-pch %S/Inputs/t2.m -o %t2.m.ast - -// RUN: index-test %t1.m.ast %t2.m.ast -point-at %S/Inputs/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/Inputs/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/Inputs/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/Inputs/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/Inputs/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/Inputs/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/Inputs/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/test/Index/resolve-loc.c b/test/Index/resolve-loc.c deleted file mode 100644 index 8c2a97a447..0000000000 --- a/test/Index/resolve-loc.c +++ /dev/null @@ -1,39 +0,0 @@ -// Run lines are sensitive to line numbers and come below the code. - -int top_var; - -void top_func_decl(int param1); - -void top_func_def(int param2) { - int local_var1; - for (int for_var = 100; for_var < 500; ++for_var) { - int local_var2 = for_var + 1; - } -} - -struct S { - int field_var; -}; - -// RUN: %clang_cc1 -emit-pch %s -o %t.ast -// RUN: c-index-test \ -// RUN: -cursor-at=%s:3:8 -cursor-at=%s:5:15 -cursor-at=%s:5:25 \ -// RUN: -cursor-at=%s:7:17 -cursor-at=%s:7:23 -cursor-at=%s:8:10 \ -// RUN: -cursor-at=%s:9:15 -cursor-at=%s:10:9 -cursor-at=%s:15:10 \ -// RUN: %s | FileCheck %s -// CHECK: VarDecl=top_var -// CHECK: FunctionDecl=top_func_decl -// CHECK: ParmDecl=param1 -// CHECK: FunctionDecl=top_func_def:7:6 (Definition) -// CHECK: ParmDecl=param2 -// CHECK: VarDecl=local_var1 -// CHECK: VarDecl=for_var -// CHECK: VarDecl=local_var2 -// CHECK: FieldDecl=field_var - -// FIXME: Eliminate these once clang_getCursor supports them. -// 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:30 > %t -// RUN: grep 'for_var + 1' %t |