Douglas Gregor | 2ccccb3 | 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 | fb62941 | 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 | 2ccccb3 | 2010-08-23 18:23:48 +0000 | [diff] [blame] | 20 | int y; |
| 21 | } |
| 22 | } |
| 23 | @end |
| 24 | |
| 25 | // RUN: c-index-test -code-completion-at=%s:7:19 %s | FileCheck -check-prefix=CHECK-CC1 %s |
| 26 | // CHECK-CC1-NOT: NotImplemented:{TypedText extern} (30) |
| 27 | // CHECK-CC1: NotImplemented:{TypedText param1} (30) |
| 28 | // RUN: c-index-test -code-completion-at=%s:9:15 %s | FileCheck -check-prefix=CHECK-CC2 %s |
Douglas Gregor | fb62941 | 2010-08-23 21:17:50 +0000 | [diff] [blame^] | 29 | // RUN: c-index-test -code-completion-at=%s:15:10 %s | FileCheck -check-prefix=CHECK-CC2 %s |
| 30 | // RUN: c-index-test -code-completion-at=%s:16:9 %s | FileCheck -check-prefix=CHECK-CC2 %s |
Douglas Gregor | 2ccccb3 | 2010-08-23 18:23:48 +0000 | [diff] [blame] | 31 | // CHECK-CC2: NotImplemented:{TypedText const} (30) |
| 32 | // CHECK-CC2-NOT: int |
| 33 | // CHECK-CC2: NotImplemented:{TypedText restrict} (30) |
| 34 | // CHECK-CC2: NotImplemented:{TypedText volatile} (30) |
Douglas Gregor | fb62941 | 2010-08-23 21:17:50 +0000 | [diff] [blame^] | 35 | // RUN: c-index-test -code-completion-at=%s:15:15 %s | FileCheck -check-prefix=CHECK-CC3 %s |
| 36 | // CHECK-CC3: ParmDecl:{ResultType id}{TypedText param1} (8) |
| 37 | // CHECK-CC3-NOT: VarDecl:{ResultType int}{TypedText q2} (8) |
| 38 | // CHECK-CC3-NOT: VarDecl:{ResultType id}{TypedText q} (8) |
| 39 | // CHECK-CC3: NotImplemented:{ResultType A *}{TypedText self} (8) |
| 40 | // CHECK-CC3: NotImplemented:{TypedText sizeof}{LeftParen (}{Placeholder expression-or-type}{RightParen )} (30) |
| 41 | // RUN: c-index-test -code-completion-at=%s:15:15 %s | FileCheck -check-prefix=CHECK-CC4 %s |
| 42 | // CHECK-CC4: ParmDecl:{ResultType id}{TypedText param1} (8) |
| 43 | // CHECK-CC4-NOT: VarDecl:{ResultType int}{TypedText q2} (8) |
| 44 | // CHECK-CC4: NotImplemented:{ResultType A *}{TypedText self} (8) |
| 45 | // CHECK-CC4: NotImplemented:{TypedText sizeof}{LeftParen (}{Placeholder expression-or-type}{RightParen )} (30) |