xref: /minix3/external/bsd/llvm/dist/clang/test/Index/complete-at-directives.m (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc/* Run lines are at the end, since line/column matter in this test. */
2*f4a2713aSLionel Sambuc@interface MyClass { @public }
3*f4a2713aSLionel Sambuc@end
4*f4a2713aSLionel Sambuc
5*f4a2713aSLionel Sambuc@implementation MyClass
6*f4a2713aSLionel Sambuc@end
7*f4a2713aSLionel Sambuc
8*f4a2713aSLionel Sambuc// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:2:2 %s | FileCheck -check-prefix=CHECK-CC1 %s
9*f4a2713aSLionel Sambuc// CHECK-CC1: {TypedText class}{HorizontalSpace  }{Placeholder name}
10*f4a2713aSLionel Sambuc// CHECK-CC1: {TypedText compatibility_alias}{HorizontalSpace  }{Placeholder alias}{HorizontalSpace  }{Placeholder class}
11*f4a2713aSLionel Sambuc// CHECK-CC1: {TypedText implementation}{HorizontalSpace  }{Placeholder class}
12*f4a2713aSLionel Sambuc// CHECK-CC1: {TypedText interface}{HorizontalSpace  }{Placeholder class}
13*f4a2713aSLionel Sambuc// CHECK-CC1: {TypedText protocol}{HorizontalSpace  }{Placeholder protocol}
14*f4a2713aSLionel Sambuc
15*f4a2713aSLionel Sambuc// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:3:2 %s | FileCheck -check-prefix=CHECK-CC2 %s
16*f4a2713aSLionel Sambuc// CHECK-CC2: {TypedText end}
17*f4a2713aSLionel Sambuc// CHECK-CC2: {TypedText optional}
18*f4a2713aSLionel Sambuc// CHECK-CC2: {TypedText property}
19*f4a2713aSLionel Sambuc// CHECK-CC2: {TypedText required}
20*f4a2713aSLionel Sambuc
21*f4a2713aSLionel Sambuc// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:6:2 %s | FileCheck -check-prefix=CHECK-CC3 %s
22*f4a2713aSLionel Sambuc// CHECK-CC3: {TypedText dynamic}{HorizontalSpace  }{Placeholder property}
23*f4a2713aSLionel Sambuc// CHECK-CC3: {TypedText end}
24*f4a2713aSLionel Sambuc// CHECK-CC3: {TypedText synthesize}{HorizontalSpace  }{Placeholder property}
25*f4a2713aSLionel Sambuc
26*f4a2713aSLionel Sambuc// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:2:1 %s | FileCheck -check-prefix=CHECK-CC4 %s
27*f4a2713aSLionel Sambuc// CHECK-CC4: NotImplemented:{TypedText @class}{HorizontalSpace  }{Placeholder name}
28*f4a2713aSLionel Sambuc// CHECK-CC4: NotImplemented:{TypedText @compatibility_alias}{HorizontalSpace  }{Placeholder alias}{HorizontalSpace  }{Placeholder class}
29*f4a2713aSLionel Sambuc// CHECK-CC4: NotImplemented:{TypedText @implementation}{HorizontalSpace  }{Placeholder class}
30*f4a2713aSLionel Sambuc// CHECK-CC4: NotImplemented:{TypedText @interface}{HorizontalSpace  }{Placeholder class}
31*f4a2713aSLionel Sambuc// CHECK-CC4: NotImplemented:{TypedText @protocol}{HorizontalSpace  }{Placeholder protocol}
32*f4a2713aSLionel Sambuc// CHECK-CC4: NotImplemented:{TypedText _Bool}
33*f4a2713aSLionel Sambuc// CHECK-CC4: TypedefDecl:{TypedText Class}
34*f4a2713aSLionel Sambuc// CHECK-CC4: TypedefDecl:{TypedText id}
35*f4a2713aSLionel Sambuc// CHECK-CC4: TypedefDecl:{TypedText SEL}
36*f4a2713aSLionel Sambuc
37*f4a2713aSLionel Sambuc// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:3:1 %s | FileCheck -check-prefix=CHECK-CC5 %s
38*f4a2713aSLionel Sambuc// CHECK-CC5: {TypedText @end}
39*f4a2713aSLionel Sambuc// CHECK-CC5: {TypedText @optional}
40*f4a2713aSLionel Sambuc// CHECK-CC5: {TypedText @property}
41*f4a2713aSLionel Sambuc// CHECK-CC5: {TypedText @required}
42*f4a2713aSLionel Sambuc
43*f4a2713aSLionel Sambuc// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:2:23 %s | FileCheck -check-prefix=CHECK-CC6 %s
44*f4a2713aSLionel Sambuc// CHECK-CC6: NotImplemented:{TypedText package}
45*f4a2713aSLionel Sambuc// CHECK-CC6: NotImplemented:{TypedText private}
46*f4a2713aSLionel Sambuc// CHECK-CC6: NotImplemented:{TypedText protected}
47*f4a2713aSLionel Sambuc// CHECK-CC6: NotImplemented:{TypedText public}
48*f4a2713aSLionel Sambuc
49*f4a2713aSLionel Sambuc// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:2:22 %s | FileCheck -check-prefix=CHECK-CC7 %s
50*f4a2713aSLionel Sambuc// CHECK-CC7: NotImplemented:{TypedText @package}
51*f4a2713aSLionel Sambuc// CHECK-CC7: NotImplemented:{TypedText @private}
52*f4a2713aSLionel Sambuc// CHECK-CC7: NotImplemented:{TypedText @protected}
53*f4a2713aSLionel Sambuc// CHECK-CC7: NotImplemented:{TypedText @public}
54*f4a2713aSLionel Sambuc// CHECK-CC7: NotImplemented:{TypedText _Bool}
55