| Douglas Gregor | 721b14d | 2012-07-31 00:50:07 +0000 | [diff] [blame] | 1 | // This test is line- and column-sensitive. See below for run lines. | 
|  | 2 |  | 
|  | 3 |  | 
|  | 4 | @interface A | 
|  | 5 | - instanceMethod:(int)value withOther:(int)other; | 
|  | 6 | + classMethod; | 
|  | 7 | @end | 
|  | 8 |  | 
|  | 9 | @interface B : A | 
|  | 10 | @end | 
|  | 11 |  | 
|  | 12 | @implementation B | 
|  | 13 | - someMethod:(A*)a { | 
|  | 14 | [a classMethod]; | 
|  | 15 | [A classMethod]; | 
|  | 16 | [a instanceMethod:0 withOther:1]; | 
|  | 17 | [self someMethod:a]; | 
|  | 18 | [super instanceMethod]; | 
| Douglas Gregor | 2d8db8f | 2012-07-31 15:27:48 +0000 | [diff] [blame] | 19 | [&,a ]{}; | 
|  | 20 | [a,self instanceMethod:0 withOther:1]{}; | 
| Douglas Gregor | 721b14d | 2012-07-31 00:50:07 +0000 | [diff] [blame] | 21 | } | 
|  | 22 |  | 
|  | 23 | @end | 
|  | 24 |  | 
|  | 25 | // RUN: c-index-test -code-completion-at=%s:14:6 -std=c++11 %s | FileCheck -check-prefix=CHECK-CC1 %s | 
| Argyrios Kyrtzidis | 9ae3956 | 2012-09-26 16:39:56 +0000 | [diff] [blame] | 26 | // CHECK-CC1: ObjCInstanceMethodDecl:{ResultType id}{TypedText instanceMethod:}{Placeholder (int)}{HorizontalSpace  }{TypedText withOther:}{Placeholder (int)} (35) | 
| Douglas Gregor | 721b14d | 2012-07-31 00:50:07 +0000 | [diff] [blame] | 27 |  | 
|  | 28 | // RUN: c-index-test -code-completion-at=%s:15:6 -std=c++11 %s | FileCheck -check-prefix=CHECK-CC2 %s | 
| Argyrios Kyrtzidis | 9ae3956 | 2012-09-26 16:39:56 +0000 | [diff] [blame] | 29 | // CHECK-CC2: ObjCClassMethodDecl:{ResultType id}{TypedText classMethod} (35) | 
| Douglas Gregor | 721b14d | 2012-07-31 00:50:07 +0000 | [diff] [blame] | 30 |  | 
|  | 31 | // RUN: c-index-test -code-completion-at=%s:16:4 -std=c++11 %s | FileCheck -check-prefix=CHECK-CC3 %s | 
| Argyrios Kyrtzidis | 9ae3956 | 2012-09-26 16:39:56 +0000 | [diff] [blame] | 32 | // CHECK-CC3: ObjCInterfaceDecl:{TypedText A} (50) | 
| Douglas Gregor | 721b14d | 2012-07-31 00:50:07 +0000 | [diff] [blame] | 33 | // CHECK-CC3: ParmDecl:{ResultType A *}{TypedText a} (34) | 
| Argyrios Kyrtzidis | 9ae3956 | 2012-09-26 16:39:56 +0000 | [diff] [blame] | 34 | // CHECK-CC3: ObjCInterfaceDecl:{TypedText B} (50) | 
|  | 35 | // CHECK-CC3: TypedefDecl:{TypedText Class} (50) | 
| Douglas Gregor | 721b14d | 2012-07-31 00:50:07 +0000 | [diff] [blame] | 36 |  | 
|  | 37 |  | 
|  | 38 | // RUN: c-index-test -code-completion-at=%s:16:21 -x objective-c++ -std=c++11 %s | FileCheck -check-prefix=CHECK-CC4 %s | 
|  | 39 | // CHECK-CC4: NotImplemented:{ResultType B *}{TypedText self} (34) | 
|  | 40 | // CHECK-CC4: NotImplemented:{ResultType A *}{TypedText super} (40) | 
|  | 41 |  | 
|  | 42 | // RUN: c-index-test -code-completion-at=%s:18:10 -x objective-c++ -std=c++11 %s | FileCheck -check-prefix=CHECK-CC1 %s | 
| Douglas Gregor | 2d8db8f | 2012-07-31 15:27:48 +0000 | [diff] [blame] | 43 |  | 
|  | 44 | // RUN: c-index-test -code-completion-at=%s:19:8 -x objective-c++ -std=c++11 %s | FileCheck -check-prefix=CHECK-CC5 %s | 
| Douglas Gregor | 0a0e2b3 | 2013-01-31 04:52:16 +0000 | [diff] [blame] | 45 | // CHECK-CC5: NotImplemented:{ResultType SEL}{TypedText _cmd} (34) | 
| Douglas Gregor | 2d8db8f | 2012-07-31 15:27:48 +0000 | [diff] [blame] | 46 | // CHECK-CC5-NEXT: NotImplemented:{ResultType B *}{TypedText self} (34) | 
|  | 47 |  | 
|  | 48 | // RUN: c-index-test -code-completion-at=%s:20:11 -x objective-c++ -std=c++11 %s | FileCheck -check-prefix=CHECK-CC6 %s | 
| Argyrios Kyrtzidis | 9ae3956 | 2012-09-26 16:39:56 +0000 | [diff] [blame] | 49 | // CHECK-CC6: ObjCInstanceMethodDecl:{ResultType id}{TypedText instanceMethod:}{Placeholder (int)}{HorizontalSpace  }{TypedText withOther:}{Placeholder (int)} (37) | 
|  | 50 | // CHECK-CC6-NEXT: ObjCInstanceMethodDecl:{ResultType id}{TypedText someMethod:}{Placeholder (A *)} (32) | 
| Douglas Gregor | 2d8db8f | 2012-07-31 15:27:48 +0000 | [diff] [blame] | 51 |  |