blob: f66f61181912b7719a6e26c7daa684ba54b5113d [file] [log] [blame]
Douglas Gregor9a0c85e2009-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 Gregor834389b2010-01-12 06:38:28 +000016// CHECK-CC1: {TypedText synchronized}{HorizontalSpace }{LeftParen (}{Placeholder expression}{RightParen )}{LeftBrace {}{Placeholder statements}{RightBrace }}
Benjamin Kramer148299f2010-01-12 11:52:20 +000017// CHECK-CC1: {TypedText throw}{HorizontalSpace }{Placeholder expression}{SemiColon ;}
Douglas Gregor9a0c85e2009-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 Gregorb6ac2452010-01-13 21:24:21 +000023// RUN: c-index-test -code-completion-at=%s:9:3 %s | FileCheck -check-prefix=CHECK-CC3 %s
24// CHECK-CC3: NotImplemented:{ResultType SEL}{TypedText _cmd}
25// CHECK-CC3: ParmDecl:{ResultType int}{TypedText arg}
26// CHECK-CC3: NotImplemented:{ResultType MyClass *}{TypedText self}
27// 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 }}
30// CHECK-CC3: TypedefDecl:{TypedText Class}
31// CHECK-CC3: TypedefDecl:{TypedText id}
32// CHECK-CC3: ObjCInterfaceDecl:{TypedText MyClass}
33// CHECK-CC3: TypedefDecl:{TypedText SEL}
34// CHECK-CC3: NotImplemented:{TypedText @encode}{LeftParen (}{Placeholder type-name}{RightParen )}
35// CHECK-CC3: NotImplemented:{TypedText @protocol}{LeftParen (}{Placeholder protocol-name}{RightParen )}
36// CHECK-CC3: NotImplemented:{TypedText @selector}{LeftParen (}{Placeholder selector}{RightParen )}