Douglas Gregor | 9a0c85e | 2009-12-07 09:51:25 +0000 | [diff] [blame] | 1 | /* The run lines are below, because this test is line- and |
| 2 | column-number sensitive. */ |
Douglas Gregor | 1ca6ae8 | 2010-01-14 01:09:38 +0000 | [diff] [blame] | 3 | @interface MyClass { int ivar; } |
Douglas Gregor | 9a0c85e | 2009-12-07 09:51:25 +0000 | [diff] [blame] | 4 | - (int)myMethod:(int)arg; |
| 5 | @end |
| 6 | |
| 7 | @implementation MyClass |
| 8 | - (int)myMethod:(int)arg { |
| 9 | @synchronized (@encode(MyClass)) { } |
| 10 | } |
| 11 | @end |
Douglas Gregor | d8e8a58 | 2010-05-25 21:41:55 +0000 | [diff] [blame] | 12 | // RUN: c-index-test -code-completion-at=%s:9:4 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC1 %s |
Douglas Gregor | 9a0c85e | 2009-12-07 09:51:25 +0000 | [diff] [blame] | 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 Gregor | 834389b | 2010-01-12 06:38:28 +0000 | [diff] [blame] | 16 | // CHECK-CC1: {TypedText synchronized}{HorizontalSpace }{LeftParen (}{Placeholder expression}{RightParen )}{LeftBrace {}{Placeholder statements}{RightBrace }} |
Douglas Gregor | fe0bdba | 2010-04-06 20:11:37 +0000 | [diff] [blame] | 17 | // CHECK-CC1: {TypedText throw}{HorizontalSpace }{Placeholder expression} |
Douglas Gregor | 9a0c85e | 2009-12-07 09:51:25 +0000 | [diff] [blame] | 18 | // CHECK-CC1: {TypedText try}{LeftBrace {}{Placeholder statements}{RightBrace }}{Text @catch}{LeftParen (}{Placeholder parameter}{RightParen )}{LeftBrace {}{Placeholder statements}{RightBrace }}{Text @finally}{LeftBrace {}{Placeholder statements}{RightBrace }} |
Douglas Gregor | d8e8a58 | 2010-05-25 21:41:55 +0000 | [diff] [blame] | 19 | // RUN: c-index-test -code-completion-at=%s:9:19 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC2 %s |
Douglas Gregor | 9a0c85e | 2009-12-07 09:51:25 +0000 | [diff] [blame] | 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 Gregor | d8e8a58 | 2010-05-25 21:41:55 +0000 | [diff] [blame] | 23 | // RUN: c-index-test -code-completion-at=%s:9:3 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC3 %s |
Douglas Gregor | ab0b4f1 | 2010-01-13 23:24:38 +0000 | [diff] [blame] | 24 | // 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 Gregor | b6ac245 | 2010-01-13 21:24:21 +0000 | [diff] [blame] | 27 | // CHECK-CC3: NotImplemented:{TypedText @synchronized}{HorizontalSpace }{LeftParen (}{Placeholder expression}{RightParen )}{LeftBrace {}{Placeholder statements}{RightBrace }} |
Douglas Gregor | fe0bdba | 2010-04-06 20:11:37 +0000 | [diff] [blame] | 28 | // CHECK-CC3: NotImplemented:{TypedText @throw}{HorizontalSpace }{Placeholder expression} |
Douglas Gregor | b6ac245 | 2010-01-13 21:24:21 +0000 | [diff] [blame] | 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 Gregor | ab0b4f1 | 2010-01-13 23:24:38 +0000 | [diff] [blame] | 30 | // CHECK-CC3: NotImplemented:{ResultType SEL}{TypedText _cmd} |
| 31 | // CHECK-CC3: ParmDecl:{ResultType int}{TypedText arg} |
Douglas Gregor | b6ac245 | 2010-01-13 21:24:21 +0000 | [diff] [blame] | 32 | // CHECK-CC3: TypedefDecl:{TypedText Class} |
| 33 | // CHECK-CC3: TypedefDecl:{TypedText id} |
Douglas Gregor | 1ca6ae8 | 2010-01-14 01:09:38 +0000 | [diff] [blame] | 34 | // CHECK-CC3: ObjCIvarDecl:{ResultType int}{TypedText ivar} |
Douglas Gregor | b6ac245 | 2010-01-13 21:24:21 +0000 | [diff] [blame] | 35 | // CHECK-CC3: ObjCInterfaceDecl:{TypedText MyClass} |
| 36 | // CHECK-CC3: TypedefDecl:{TypedText SEL} |
Douglas Gregor | ab0b4f1 | 2010-01-13 23:24:38 +0000 | [diff] [blame] | 37 | // CHECK-CC3: NotImplemented:{ResultType MyClass *}{TypedText self} |