annotate clang/test/Index/complete-declarators.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 // This test is line- and column-sensitive, so test commands are at the bottom.
anatofuz
parents:
diff changeset
2 @protocol P
anatofuz
parents:
diff changeset
3 - (int)method:(id)param1;
anatofuz
parents:
diff changeset
4 @end
anatofuz
parents:
diff changeset
5
anatofuz
parents:
diff changeset
6 @interface A <P>
anatofuz
parents:
diff changeset
7 - (int)method:(id)param1;
anatofuz
parents:
diff changeset
8
anatofuz
parents:
diff changeset
9 @property int prop1;
anatofuz
parents:
diff changeset
10 @end
anatofuz
parents:
diff changeset
11
anatofuz
parents:
diff changeset
12 @implementation A
anatofuz
parents:
diff changeset
13 - (int)method:(id)param1 {
anatofuz
parents:
diff changeset
14 int q2;
anatofuz
parents:
diff changeset
15 for(id q in param1) {
anatofuz
parents:
diff changeset
16 int y;
anatofuz
parents:
diff changeset
17 }
anatofuz
parents:
diff changeset
18 id q;
anatofuz
parents:
diff changeset
19 for(q in param1) {
anatofuz
parents:
diff changeset
20 int y;
anatofuz
parents:
diff changeset
21 }
anatofuz
parents:
diff changeset
22
anatofuz
parents:
diff changeset
23 static P *p = 0;
anatofuz
parents:
diff changeset
24 }
anatofuz
parents:
diff changeset
25 - (boid)method2 {}
anatofuz
parents:
diff changeset
26 @end
anatofuz
parents:
diff changeset
27
anatofuz
parents:
diff changeset
28 // RUN: c-index-test -code-completion-at=%s:7:4 %s | FileCheck -check-prefix=CHECK-CC0 %s
anatofuz
parents:
diff changeset
29 // CHECK-CC0: NotImplemented:{TypedText IBAction}{RightParen )}{Placeholder selector}{Colon :}{LeftParen (}{Text id}{RightParen )}{Text sender} (40)
anatofuz
parents:
diff changeset
30 // CHECK-CC0: macro definition:{TypedText IBAction} (70)
anatofuz
parents:
diff changeset
31 // CHECK-CC0: macro definition:{TypedText IBOutlet} (70)
anatofuz
parents:
diff changeset
32 // CHECK-CC0: macro definition:{TypedText IBOutletCollection}{LeftParen (}{Placeholder ClassName}{RightParen )} (70)
anatofuz
parents:
diff changeset
33 // CHECK-CC0: TypedefDecl:{TypedText id} (50)
anatofuz
parents:
diff changeset
34 // CHECK-CC0: NotImplemented:{TypedText in} (40)
anatofuz
parents:
diff changeset
35 // CHECK-CC0: NotImplemented:{TypedText inout} (40)
anatofuz
parents:
diff changeset
36 // CHECK-CC0: NotImplemented:{TypedText instancetype} (40)
anatofuz
parents:
diff changeset
37 // CHECK-CC0: NotImplemented:{TypedText int} (50)
anatofuz
parents:
diff changeset
38 // CHECK-CC0: NotImplemented:{TypedText long} (50)
anatofuz
parents:
diff changeset
39 // RUN: c-index-test -code-completion-at=%s:7:19 %s | FileCheck -check-prefix=CHECK-CC1 %s
anatofuz
parents:
diff changeset
40 // CHECK-CC1-NOT: NotImplemented:{TypedText extern} (40)
anatofuz
parents:
diff changeset
41 // CHECK-CC1: NotImplemented:{TypedText param1} (40)
anatofuz
parents:
diff changeset
42 // RUN: c-index-test -code-completion-at=%s:9:15 %s | FileCheck -check-prefix=CHECK-CC2 %s
anatofuz
parents:
diff changeset
43 // RUN: c-index-test -code-completion-at=%s:15:10 %s | FileCheck -check-prefix=CHECK-CC2 %s
anatofuz
parents:
diff changeset
44 // RUN: c-index-test -code-completion-at=%s:16:9 %s | FileCheck -check-prefix=CHECK-CC2 %s
anatofuz
parents:
diff changeset
45 // CHECK-CC2: NotImplemented:{TypedText const} (40)
anatofuz
parents:
diff changeset
46 // CHECK-CC2-NOT: int
anatofuz
parents:
diff changeset
47 // CHECK-CC2: NotImplemented:{TypedText restrict} (40)
anatofuz
parents:
diff changeset
48 // CHECK-CC2: NotImplemented:{TypedText volatile} (40)
anatofuz
parents:
diff changeset
49 // RUN: c-index-test -code-completion-at=%s:15:15 %s | FileCheck -check-prefix=CHECK-CC3 %s
anatofuz
parents:
diff changeset
50 // CHECK-CC3: ParmDecl:{ResultType id}{TypedText param1} (34)
anatofuz
parents:
diff changeset
51 // CHECK-CC3-NOT: VarDecl:{ResultType int}{TypedText q2}
anatofuz
parents:
diff changeset
52 // CHECK-CC3-NOT: VarDecl:{ResultType id}{TypedText q}
anatofuz
parents:
diff changeset
53 // CHECK-CC3: NotImplemented:{ResultType A *}{TypedText self} (34)
anatofuz
parents:
diff changeset
54 // CHECK-CC3: NotImplemented:{ResultType size_t}{TypedText sizeof}{LeftParen (}{Placeholder expression-or-type}{RightParen )} (40)
anatofuz
parents:
diff changeset
55 // RUN: c-index-test -code-completion-at=%s:15:15 %s | FileCheck -check-prefix=CHECK-CC4 %s
anatofuz
parents:
diff changeset
56 // CHECK-CC4: ParmDecl:{ResultType id}{TypedText param1} (34)
anatofuz
parents:
diff changeset
57 // CHECK-CC4-NOT: VarDecl:{ResultType int}{TypedText q2}
anatofuz
parents:
diff changeset
58 // CHECK-CC4: NotImplemented:{ResultType A *}{TypedText self} (34)
anatofuz
parents:
diff changeset
59 // CHECK-CC4: NotImplemented:{ResultType size_t}{TypedText sizeof}{LeftParen (}{Placeholder expression-or-type}{RightParen )} (40)
anatofuz
parents:
diff changeset
60 // RUN: c-index-test -code-completion-at=%s:23:10 %s | FileCheck -check-prefix=CHECK-CC5 %s
anatofuz
parents:
diff changeset
61 // CHECK-CC5: NotImplemented:{TypedText _Bool} (50)
anatofuz
parents:
diff changeset
62 // CHECK-CC5: NotImplemented:{TypedText _Complex} (50)
anatofuz
parents:
diff changeset
63 // CHECK-CC5: NotImplemented:{TypedText _Imaginary} (50)
anatofuz
parents:
diff changeset
64 // CHECK-CC5: ObjCInterfaceDecl:{TypedText A} (50)
anatofuz
parents:
diff changeset
65 // CHECK-CC5: NotImplemented:{TypedText char} (50)
anatofuz
parents:
diff changeset
66 // CHECK-CC5: TypedefDecl:{TypedText Class} (50)
anatofuz
parents:
diff changeset
67 // CHECK-CC5: NotImplemented:{TypedText const} (50)
anatofuz
parents:
diff changeset
68 // CHECK-CC5: NotImplemented:{TypedText double} (50)
anatofuz
parents:
diff changeset
69 // CHECK-CC5: NotImplemented:{TypedText enum} (50)
anatofuz
parents:
diff changeset
70 // CHECK-CC5: NotImplemented:{TypedText float} (50)
anatofuz
parents:
diff changeset
71 // CHECK-CC5: TypedefDecl:{TypedText id} (50)
anatofuz
parents:
diff changeset
72 // CHECK-CC5: NotImplemented:{TypedText int} (50)
anatofuz
parents:
diff changeset
73 // CHECK-CC5: NotImplemented:{TypedText long} (50)
anatofuz
parents:
diff changeset
74 // CHECK-CC5: NotImplemented:{TypedText restrict} (50)
anatofuz
parents:
diff changeset
75 // CHECK-CC5: TypedefDecl:{TypedText SEL} (50)
anatofuz
parents:
diff changeset
76 // CHECK-CC5: NotImplemented:{TypedText short} (50)
anatofuz
parents:
diff changeset
77 // CHECK-CC5: NotImplemented:{TypedText signed} (50)
anatofuz
parents:
diff changeset
78 // CHECK-CC5: NotImplemented:{TypedText struct} (50)
anatofuz
parents:
diff changeset
79 // CHECK-CC5: NotImplemented:{TypedText typeof}{HorizontalSpace }{Placeholder expression} (40)
anatofuz
parents:
diff changeset
80 // CHECK-CC5: NotImplemented:{TypedText typeof}{LeftParen (}{Placeholder type}{RightParen )} (40)
anatofuz
parents:
diff changeset
81 // CHECK-CC5: NotImplemented:{TypedText union} (50)
anatofuz
parents:
diff changeset
82 // CHECK-CC5: NotImplemented:{TypedText unsigned} (50)
anatofuz
parents:
diff changeset
83 // CHECK-CC5: NotImplemented:{TypedText void} (50)
anatofuz
parents:
diff changeset
84 // CHECK-CC5: NotImplemented:{TypedText volatile} (50)
anatofuz
parents:
diff changeset
85
anatofuz
parents:
diff changeset
86 // Check that there are no duplicate entries if we code-complete after an @implementation
anatofuz
parents:
diff changeset
87 // RUN: c-index-test -code-completion-at=%s:27:1 %s | FileCheck -check-prefix=CHECK-CC6 %s
anatofuz
parents:
diff changeset
88 // CHECK-CC6: ObjCInterfaceDecl:{TypedText A}
anatofuz
parents:
diff changeset
89 // CHECK-CC6-NOT: ObjCInterfaceDecl:{TypedText A}