| Douglas Gregor | c49f5b2 | 2010-08-23 18:23:48 +0000 | [diff] [blame] | 1 | // This test is line- and column-sensitive, so test commands are at the bottom. | 
|  | 2 | @protocol P | 
|  | 3 | - (int)method:(id)param1; | 
|  | 4 | @end | 
|  | 5 |  | 
|  | 6 | @interface A <P> | 
|  | 7 | - (int)method:(id)param1; | 
|  | 8 |  | 
|  | 9 | @property int prop1; | 
|  | 10 | @end | 
|  | 11 |  | 
|  | 12 | @implementation A | 
|  | 13 | - (int)method:(id)param1 { | 
| Douglas Gregor | 68762e7 | 2010-08-23 21:17:50 +0000 | [diff] [blame] | 14 | int q2; | 
|  | 15 | for(id q in param1) { | 
|  | 16 | int y; | 
|  | 17 | } | 
|  | 18 | id q; | 
|  | 19 | for(q in param1) { | 
| Douglas Gregor | c49f5b2 | 2010-08-23 18:23:48 +0000 | [diff] [blame] | 20 | int y; | 
|  | 21 | } | 
| Douglas Gregor | 8003924 | 2011-02-15 20:33:25 +0000 | [diff] [blame] | 22 |  | 
|  | 23 | static P *p = 0; | 
| Douglas Gregor | c49f5b2 | 2010-08-23 18:23:48 +0000 | [diff] [blame] | 24 | } | 
|  | 25 | @end | 
|  | 26 |  | 
|  | 27 | // RUN: c-index-test -code-completion-at=%s:7:19 %s | FileCheck -check-prefix=CHECK-CC1 %s | 
| Douglas Gregor | 0787b32 | 2010-10-19 00:03:23 +0000 | [diff] [blame] | 28 | // CHECK-CC1-NOT: NotImplemented:{TypedText extern} (40) | 
|  | 29 | // CHECK-CC1: NotImplemented:{TypedText param1} (40) | 
| Douglas Gregor | c49f5b2 | 2010-08-23 18:23:48 +0000 | [diff] [blame] | 30 | // RUN: c-index-test -code-completion-at=%s:9:15 %s | FileCheck -check-prefix=CHECK-CC2 %s | 
| Douglas Gregor | 68762e7 | 2010-08-23 21:17:50 +0000 | [diff] [blame] | 31 | // RUN: c-index-test -code-completion-at=%s:15:10 %s | FileCheck -check-prefix=CHECK-CC2 %s | 
|  | 32 | // RUN: c-index-test -code-completion-at=%s:16:9 %s | FileCheck -check-prefix=CHECK-CC2 %s | 
| Douglas Gregor | 0787b32 | 2010-10-19 00:03:23 +0000 | [diff] [blame] | 33 | // CHECK-CC2: NotImplemented:{TypedText const} (40) | 
| Douglas Gregor | c49f5b2 | 2010-08-23 18:23:48 +0000 | [diff] [blame] | 34 | // CHECK-CC2-NOT: int | 
| Douglas Gregor | 0787b32 | 2010-10-19 00:03:23 +0000 | [diff] [blame] | 35 | // CHECK-CC2: NotImplemented:{TypedText restrict} (40) | 
|  | 36 | // CHECK-CC2: NotImplemented:{TypedText volatile} (40) | 
| Douglas Gregor | 68762e7 | 2010-08-23 21:17:50 +0000 | [diff] [blame] | 37 | // RUN: c-index-test -code-completion-at=%s:15:15 %s | FileCheck -check-prefix=CHECK-CC3 %s | 
| Douglas Gregor | 0787b32 | 2010-10-19 00:03:23 +0000 | [diff] [blame] | 38 | // CHECK-CC3: ParmDecl:{ResultType id}{TypedText param1} (34) | 
|  | 39 | // CHECK-CC3-NOT: VarDecl:{ResultType int}{TypedText q2} | 
|  | 40 | // CHECK-CC3-NOT: VarDecl:{ResultType id}{TypedText q} | 
|  | 41 | // CHECK-CC3: NotImplemented:{ResultType A *}{TypedText self} (34) | 
| Douglas Gregor | e5c79d5 | 2011-10-18 21:20:17 +0000 | [diff] [blame] | 42 | // CHECK-CC3: NotImplemented:{ResultType size_t}{TypedText sizeof}{LeftParen (}{Placeholder expression-or-type}{RightParen )} (40) | 
| Douglas Gregor | 68762e7 | 2010-08-23 21:17:50 +0000 | [diff] [blame] | 43 | // RUN: c-index-test -code-completion-at=%s:15:15 %s | FileCheck -check-prefix=CHECK-CC4 %s | 
| Douglas Gregor | 0787b32 | 2010-10-19 00:03:23 +0000 | [diff] [blame] | 44 | // CHECK-CC4: ParmDecl:{ResultType id}{TypedText param1} (34) | 
|  | 45 | // CHECK-CC4-NOT: VarDecl:{ResultType int}{TypedText q2} | 
|  | 46 | // CHECK-CC4: NotImplemented:{ResultType A *}{TypedText self} (34) | 
| Douglas Gregor | e5c79d5 | 2011-10-18 21:20:17 +0000 | [diff] [blame] | 47 | // CHECK-CC4: NotImplemented:{ResultType size_t}{TypedText sizeof}{LeftParen (}{Placeholder expression-or-type}{RightParen )} (40) | 
| Douglas Gregor | 8003924 | 2011-02-15 20:33:25 +0000 | [diff] [blame] | 48 | // RUN: c-index-test -code-completion-at=%s:23:10 %s | FileCheck -check-prefix=CHECK-CC5 %s | 
|  | 49 | // CHECK-CC5: NotImplemented:{TypedText _Bool} (50) | 
|  | 50 | // CHECK-CC5: NotImplemented:{TypedText _Complex} (50) | 
|  | 51 | // CHECK-CC5: NotImplemented:{TypedText _Imaginary} (50) | 
|  | 52 | // CHECK-CC5: ObjCInterfaceDecl:{TypedText A} (50) | 
|  | 53 | // CHECK-CC5: NotImplemented:{TypedText char} (50) | 
|  | 54 | // CHECK-CC5: TypedefDecl:{TypedText Class} (50) | 
|  | 55 | // CHECK-CC5: NotImplemented:{TypedText const} (50) | 
|  | 56 | // CHECK-CC5: NotImplemented:{TypedText double} (50) | 
|  | 57 | // CHECK-CC5: NotImplemented:{TypedText enum} (50) | 
|  | 58 | // CHECK-CC5: NotImplemented:{TypedText float} (50) | 
|  | 59 | // CHECK-CC5: TypedefDecl:{TypedText id} (50) | 
|  | 60 | // CHECK-CC5: NotImplemented:{TypedText int} (50) | 
|  | 61 | // CHECK-CC5: NotImplemented:{TypedText long} (50) | 
|  | 62 | // CHECK-CC5: NotImplemented:{TypedText restrict} (50) | 
|  | 63 | // CHECK-CC5: TypedefDecl:{TypedText SEL} (50) | 
|  | 64 | // CHECK-CC5: NotImplemented:{TypedText short} (50) | 
|  | 65 | // CHECK-CC5: NotImplemented:{TypedText signed} (50) | 
|  | 66 | // CHECK-CC5: NotImplemented:{TypedText struct} (50) | 
|  | 67 | // CHECK-CC5: NotImplemented:{TypedText typeof}{HorizontalSpace  }{Placeholder expression} (40) | 
|  | 68 | // CHECK-CC5: NotImplemented:{TypedText typeof}{LeftParen (}{Placeholder type}{RightParen )} (40) | 
|  | 69 | // CHECK-CC5: NotImplemented:{TypedText union} (50) | 
|  | 70 | // CHECK-CC5: NotImplemented:{TypedText unsigned} (50) | 
|  | 71 | // CHECK-CC5: NotImplemented:{TypedText void} (50) | 
|  | 72 | // CHECK-CC5: NotImplemented:{TypedText volatile} (50) |