blob: 4a2f1527f9c721f11f9ca87a79399ea79a7b0968 [file] [log] [blame]
Douglas Gregorbc7c5e42009-12-07 09:51:25 +00001/* The run lines are below, because this test is line- and
2 column-number sensitive. */
3@interface MyClass { }
4- (int)myMethod:(int)arg;
5@end
6
7@implementation MyClass
8- (int)myMethod:(int)arg {
9 @synchronized (@encode(MyClass)) { }
10}
11@end
12// RUN: c-index-test -code-completion-at=%s:9:4 %s | FileCheck -check-prefix=CHECK-CC1 %s
13// CHECK-CC1: {TypedText encode}{LeftParen (}{Placeholder type-name}{RightParen )}
14// CHECK-CC1: {TypedText protocol}{LeftParen (}{Placeholder protocol-name}{RightParen )}
15// CHECK-CC1: {TypedText selector}{LeftParen (}{Placeholder selector}{RightParen )}
Douglas Gregor6a803932010-01-12 06:38:28 +000016// CHECK-CC1: {TypedText synchronized}{HorizontalSpace }{LeftParen (}{Placeholder expression}{RightParen )}{LeftBrace {}{Placeholder statements}{RightBrace }}
Benjamin Kramerd8158252010-01-12 11:52:20 +000017// CHECK-CC1: {TypedText throw}{HorizontalSpace }{Placeholder expression}{SemiColon ;}
Douglas Gregorbc7c5e42009-12-07 09:51:25 +000018// CHECK-CC1: {TypedText try}{LeftBrace {}{Placeholder statements}{RightBrace }}{Text @catch}{LeftParen (}{Placeholder parameter}{RightParen )}{LeftBrace {}{Placeholder statements}{RightBrace }}{Text @finally}{LeftBrace {}{Placeholder statements}{RightBrace }}
19// RUN: c-index-test -code-completion-at=%s:9:19 %s | FileCheck -check-prefix=CHECK-CC2 %s
20// CHECK-CC2: {TypedText encode}{LeftParen (}{Placeholder type-name}{RightParen )}
21// CHECK-CC2: {TypedText protocol}{LeftParen (}{Placeholder protocol-name}{RightParen )}
22// CHECK-CC2: {TypedText selector}{LeftParen (}{Placeholder selector}{RightParen )}
Douglas Gregorf1934162010-01-13 21:24:21 +000023// RUN: c-index-test -code-completion-at=%s:9:3 %s | FileCheck -check-prefix=CHECK-CC3 %s
Douglas Gregor52ce62f2010-01-13 23:24:38 +000024// CHECK-CC3: NotImplemented:{TypedText @encode}{LeftParen (}{Placeholder type-name}{RightParen )}
25// CHECK-CC3: NotImplemented:{TypedText @protocol}{LeftParen (}{Placeholder protocol-name}{RightParen )}
26// CHECK-CC3: NotImplemented:{TypedText @selector}{LeftParen (}{Placeholder selector}{RightParen )}
Douglas Gregorf1934162010-01-13 21:24:21 +000027// CHECK-CC3: NotImplemented:{TypedText @synchronized}{HorizontalSpace }{LeftParen (}{Placeholder expression}{RightParen )}{LeftBrace {}{Placeholder statements}{RightBrace }}
28// CHECK-CC3: NotImplemented:{TypedText @throw}{HorizontalSpace }{Placeholder expression}{SemiColon ;}
29// 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 }}
Douglas Gregor52ce62f2010-01-13 23:24:38 +000030// CHECK-CC3: NotImplemented:{ResultType SEL}{TypedText _cmd}
31// CHECK-CC3: ParmDecl:{ResultType int}{TypedText arg}
Douglas Gregorf1934162010-01-13 21:24:21 +000032// CHECK-CC3: TypedefDecl:{TypedText Class}
33// CHECK-CC3: TypedefDecl:{TypedText id}
34// CHECK-CC3: ObjCInterfaceDecl:{TypedText MyClass}
35// CHECK-CC3: TypedefDecl:{TypedText SEL}
Douglas Gregor52ce62f2010-01-13 23:24:38 +000036// CHECK-CC3: NotImplemented:{ResultType MyClass *}{TypedText self}