1 /* The run lines are below, because this test is line- and
2 column-number sensitive. */
3 @interface MyClass { int ivar; }
4 - (int)myMethod:(int)arg;
7 @implementation MyClass
8 - (int)myMethod:(int)arg {
9 @synchronized (@encode(MyClass)) { }
14 + (int)add:(int)x to:(int)y;
15 + (int)add:(int)x to:(int)y plus:(int)z;
22 // RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:9:4 %s | FileCheck -check-prefix=CHECK-CC1 %s
23 // CHECK-CC1: {TypedText encode}{LeftParen (}{Placeholder type-name}{RightParen )}
24 // CHECK-CC1: {TypedText protocol}{LeftParen (}{Placeholder protocol-name}{RightParen )}
25 // CHECK-CC1: {TypedText selector}{LeftParen (}{Placeholder selector}{RightParen )}
26 // CHECK-CC1: {TypedText synchronized}{HorizontalSpace }{LeftParen (}{Placeholder expression}{RightParen )}{LeftBrace {}{Placeholder statements}{RightBrace }}
27 // CHECK-CC1: {TypedText throw}{HorizontalSpace }{Placeholder expression}
28 // CHECK-CC1: {TypedText try}{LeftBrace {}{Placeholder statements}{RightBrace }}{Text @catch}{LeftParen (}{Placeholder parameter}{RightParen )}{LeftBrace {}{Placeholder statements}{RightBrace }}{Text @finally}{LeftBrace {}{Placeholder statements}{RightBrace }}
29 // RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:9:19 %s | FileCheck -check-prefix=CHECK-CC2 %s
30 // CHECK-CC2: {TypedText encode}{LeftParen (}{Placeholder type-name}{RightParen )}
31 // CHECK-CC2: {TypedText protocol}{LeftParen (}{Placeholder protocol-name}{RightParen )}
32 // CHECK-CC2: {TypedText selector}{LeftParen (}{Placeholder selector}{RightParen )}
33 // RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:9:3 %s | FileCheck -check-prefix=CHECK-CC3 %s
34 // CHECK-CC3: NotImplemented:{ResultType char[]}{TypedText @encode}{LeftParen (}{Placeholder type-name}{RightParen )}
35 // CHECK-CC3: NotImplemented:{ResultType Protocol *}{TypedText @protocol}{LeftParen (}{Placeholder protocol-name}{RightParen )}
36 // CHECK-CC3: NotImplemented:{ResultType SEL}{TypedText @selector}{LeftParen (}{Placeholder selector}{RightParen )}
37 // CHECK-CC3: NotImplemented:{TypedText @synchronized}{HorizontalSpace }{LeftParen (}{Placeholder expression}{RightParen )}{LeftBrace {}{Placeholder statements}{RightBrace }}
38 // CHECK-CC3: NotImplemented:{TypedText @throw}{HorizontalSpace }{Placeholder expression}
39 // CHECK-CC3: NotImplemented:{TypedText @try}{LeftBrace {}{Placeholder statements}{RightBrace }}{Text @catch}{LeftParen (}{Placeholder parameter}{RightParen )}{LeftBrace {}{Placeholder statements}{RightBrace }}{Text @finally}{LeftBrace {}{Placeholder statements}{RightBrace }}
40 // CHECK-CC3: NotImplemented:{ResultType SEL}{TypedText _cmd}
41 // CHECK-CC3: ParmDecl:{ResultType int}{TypedText arg}
42 // CHECK-CC3: TypedefDecl:{TypedText Class}
43 // CHECK-CC3: TypedefDecl:{TypedText id}
44 // CHECK-CC3: ObjCIvarDecl:{ResultType int}{TypedText ivar}
45 // CHECK-CC3: ObjCInterfaceDecl:{TypedText MyClass}
46 // CHECK-CC3: TypedefDecl:{TypedText SEL}
47 // CHECK-CC3: NotImplemented:{ResultType MyClass *}{TypedText self}
48 // RUN: c-index-test -code-completion-at=%s:19:13 %s | FileCheck -check-prefix=CHECK-CC4 %s
49 // CHECK-CC4: NotImplemented:{TypedText add:to:} (40)
50 // CHECK-CC4: NotImplemented:{TypedText add:to:plus:} (40)
51 // CHECK-CC4: NotImplemented:{TypedText myMethod:} (40)
52 // RUN: c-index-test -code-completion-at=%s:19:17 %s | FileCheck -check-prefix=CHECK-CC5 %s
53 // CHECK-CC5: NotImplemented:{Informative add:}{TypedText to:} (40)
54 // CHECK-CC5: NotImplemented:{Informative add:}{TypedText to:plus:} (40)