annotate clang/test/Index/complete-interfaces.m @ 207:2e18cbf3894f

LLVM12
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 08 Jun 2021 06:07:14 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 /* Note: the RUN lines are near the end of the file, since line/column
anatofuz
parents:
diff changeset
2 matter for this test. */
anatofuz
parents:
diff changeset
3
anatofuz
parents:
diff changeset
4 @class Int1, Int2, Int3, Int4;
anatofuz
parents:
diff changeset
5
anatofuz
parents:
diff changeset
6 @interface Int3
anatofuz
parents:
diff changeset
7 {
anatofuz
parents:
diff changeset
8 }
anatofuz
parents:
diff changeset
9 @end
anatofuz
parents:
diff changeset
10
anatofuz
parents:
diff changeset
11 @interface Int2 : Int3
anatofuz
parents:
diff changeset
12 {
anatofuz
parents:
diff changeset
13 }
anatofuz
parents:
diff changeset
14 @end
anatofuz
parents:
diff changeset
15
anatofuz
parents:
diff changeset
16 @implementation Int2
anatofuz
parents:
diff changeset
17 @end
anatofuz
parents:
diff changeset
18
anatofuz
parents:
diff changeset
19 @implementation Int3
anatofuz
parents:
diff changeset
20 @end
anatofuz
parents:
diff changeset
21
anatofuz
parents:
diff changeset
22 // RUN: c-index-test -code-completion-at=%s:6:12 %s | FileCheck -check-prefix=CHECK-CC1 %s
anatofuz
parents:
diff changeset
23 // CHECK-CC1: ObjCInterfaceDecl:{TypedText Int1}
anatofuz
parents:
diff changeset
24 // CHECK-CC1: ObjCInterfaceDecl:{TypedText Int2}
anatofuz
parents:
diff changeset
25 // CHECK-CC1: ObjCInterfaceDecl:{TypedText Int3}
anatofuz
parents:
diff changeset
26 // CHECK-CC1: ObjCInterfaceDecl:{TypedText Int4}
anatofuz
parents:
diff changeset
27 // RUN: c-index-test -code-completion-at=%s:11:12 %s | FileCheck -check-prefix=CHECK-CC2 %s
anatofuz
parents:
diff changeset
28 // CHECK-CC2: ObjCInterfaceDecl:{TypedText Int1}
anatofuz
parents:
diff changeset
29 // CHECK-CC2-NEXT: ObjCInterfaceDecl:{TypedText Int2}
anatofuz
parents:
diff changeset
30 // CHECK-CC2-NEXT: ObjCInterfaceDecl:{TypedText Int3}
anatofuz
parents:
diff changeset
31 // CHECK-CC2-NEXT: ObjCInterfaceDecl:{TypedText Int4}
anatofuz
parents:
diff changeset
32 // RUN: c-index-test -code-completion-at=%s:11:19 %s | FileCheck -check-prefix=CHECK-CC3 %s
anatofuz
parents:
diff changeset
33 // CHECK-CC3: ObjCInterfaceDecl:{TypedText Int1}
anatofuz
parents:
diff changeset
34 // CHECK-CC3-NEXT: ObjCInterfaceDecl:{TypedText Int3}
anatofuz
parents:
diff changeset
35 // CHECK-CC3-NEXT: ObjCInterfaceDecl:{TypedText Int4}
anatofuz
parents:
diff changeset
36 // RUN: c-index-test -code-completion-at=%s:16:17 %s | FileCheck -check-prefix=CHECK-CC4 %s
anatofuz
parents:
diff changeset
37 // CHECK-CC4: ObjCInterfaceDecl:{TypedText Int1}
anatofuz
parents:
diff changeset
38 // CHECK-CC4-NEXT: ObjCInterfaceDecl:{TypedText Int2}
anatofuz
parents:
diff changeset
39 // CHECK-CC4-NEXT: ObjCInterfaceDecl:{TypedText Int3}
anatofuz
parents:
diff changeset
40 // CHECK-CC4-NEXT: ObjCInterfaceDecl:{TypedText Int4}
anatofuz
parents:
diff changeset
41 // RUN: c-index-test -code-completion-at=%s:19:17 %s | FileCheck -check-prefix=CHECK-CC5 %s
anatofuz
parents:
diff changeset
42 // CHECK-CC5: ObjCInterfaceDecl:{TypedText Int1}
anatofuz
parents:
diff changeset
43 // CHECK-CC5-NEXT: ObjCInterfaceDecl:{TypedText Int3}
anatofuz
parents:
diff changeset
44 // CHECK-CC5-NEXT: ObjCInterfaceDecl:{TypedText Int4}
anatofuz
parents:
diff changeset
45
anatofuz
parents:
diff changeset
46
anatofuz
parents:
diff changeset
47 // RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:11:12 %s | FileCheck -check-prefix=CHECK-CC2 %s
anatofuz
parents:
diff changeset
48
anatofuz
parents:
diff changeset
49
anatofuz
parents:
diff changeset
50 void useClasses() {
anatofuz
parents:
diff changeset
51 int i = 0;
anatofuz
parents:
diff changeset
52 [Int3 message:1];
anatofuz
parents:
diff changeset
53 }
anatofuz
parents:
diff changeset
54
anatofuz
parents:
diff changeset
55 // RUN: c-index-test -code-completion-at=%s:51:11 %s | FileCheck -check-prefix=CHECK-USE %s
anatofuz
parents:
diff changeset
56 // RUN: c-index-test -code-completion-at=%s:52:17 %s | FileCheck -check-prefix=CHECK-USE %s
anatofuz
parents:
diff changeset
57 // CHECK-USE: ObjCInterfaceDecl:{TypedText Int2} (50)
anatofuz
parents:
diff changeset
58 // CHECK-USE: ObjCInterfaceDecl:{TypedText Int3} (50)
anatofuz
parents:
diff changeset
59 // CHECK-USE-NOT: Int1
anatofuz
parents:
diff changeset
60 // CHECK-USE-NOT: Int4
anatofuz
parents:
diff changeset
61
anatofuz
parents:
diff changeset
62 // Caching should work too:
anatofuz
parents:
diff changeset
63 // RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:51:11 %s | FileCheck -check-prefix=CHECK-USE %s