Douglas Gregor | 55385fe | 2009-11-18 04:19:12 +0000 | [diff] [blame] | 1 | /* Note: the RUN lines are near the end of the file, since line/column |
| 2 | matter for this test. */ |
Douglas Gregor | 95ac655 | 2009-11-18 01:29:26 +0000 | [diff] [blame] | 3 | |
| 4 | @protocol MyProtocol |
| 5 | @property float ProtoProp; |
| 6 | @end |
| 7 | |
| 8 | @interface Super { |
| 9 | int SuperIVar; |
| 10 | } |
| 11 | @end |
| 12 | @interface Int : Super<MyProtocol> |
| 13 | { |
| 14 | int IVar; |
| 15 | } |
| 16 | |
| 17 | @property int prop1; |
| 18 | @end |
| 19 | |
| 20 | void test_props(Int* ptr) { |
| 21 | ptr.prop1 = 0; |
| 22 | ptr->IVar = 0; |
| 23 | } |
| 24 | |
| 25 | // RUN: c-index-test -code-completion-at=%s:21:7 %s | FileCheck -check-prefix=CHECK-CC1 %s |
Douglas Gregor | ff5ce6e | 2009-12-18 18:53:37 +0000 | [diff] [blame] | 26 | // CHECK-CC1: ObjCPropertyDecl:{ResultType int}{TypedText prop1} |
| 27 | // CHECK-CC1: ObjCPropertyDecl:{ResultType float}{TypedText ProtoProp} |
Douglas Gregor | 95ac655 | 2009-11-18 01:29:26 +0000 | [diff] [blame] | 28 | // RUN: c-index-test -code-completion-at=%s:22:8 %s | FileCheck -check-prefix=CHECK-CC2 %s |
Douglas Gregor | 8ec904c | 2010-10-19 00:03:23 +0000 | [diff] [blame] | 29 | // CHECK-CC2: ObjCIvarDecl:{ResultType int}{TypedText IVar} (35) |
| 30 | // CHECK-CC2: ObjCIvarDecl:{ResultType int}{TypedText SuperIVar} (37) |