Douglas Gregor | ca45da0 | 2010-11-02 20:36:02 +0000 | [diff] [blame] | 1 | // Note: this test is line- and column-sensitive. Test commands are at |
| 2 | // the end. |
| 3 | |
| 4 | |
| 5 | @interface A |
| 6 | @property int prop1; |
| 7 | @end |
| 8 | |
| 9 | @interface B : A { |
| 10 | float _prop2; |
| 11 | } |
| 12 | @property float prop2; |
| 13 | @property short prop3; |
| 14 | @end |
| 15 | |
| 16 | @interface B () |
| 17 | @property double prop4; |
| 18 | @end |
| 19 | |
| 20 | @implementation B |
| 21 | @synthesize prop2 = _prop2; |
| 22 | |
| 23 | - (int)method { |
| 24 | return _prop2; |
| 25 | } |
| 26 | |
| 27 | @dynamic prop3; |
| 28 | |
| 29 | - (short)method2 { |
Ted Kremenek | d2ee809 | 2011-09-27 23:39:40 +0000 | [diff] [blame] | 30 | return _prop4; |
Douglas Gregor | ca45da0 | 2010-11-02 20:36:02 +0000 | [diff] [blame] | 31 | } |
| 32 | |
| 33 | - (short)method3 { |
| 34 | return prop3; |
| 35 | } |
| 36 | @end |
| 37 | |
Argyrios Kyrtzidis | 0cc9fdb | 2012-04-10 17:23:51 +0000 | [diff] [blame] | 38 | // RUN: c-index-test -code-completion-at=%s:24:1 -target x86_64-apple-macosx10.7 -fobjc-nonfragile-abi %s | FileCheck %s |
| 39 | // RUN: c-index-test -code-completion-at=%s:30:2 -target x86_64-apple-macosx10.7 -fobjc-nonfragile-abi %s | FileCheck %s |
| 40 | // RUN: c-index-test -code-completion-at=%s:34:2 -target x86_64-apple-macosx10.7 -fobjc-nonfragile-abi %s | FileCheck %s |
Douglas Gregor | ca45da0 | 2010-11-02 20:36:02 +0000 | [diff] [blame] | 41 | |
Argyrios Kyrtzidis | 7d10087 | 2011-09-04 03:32:15 +0000 | [diff] [blame] | 42 | // CHECK: NotImplemented:{TypedText _Bool} (50) |
| 43 | // CHECK: ObjCIvarDecl:{ResultType float}{TypedText _prop2} (35) |
| 44 | // CHECK-NOT: prop2 |
| 45 | // CHECK-NOT: prop3 |
Nick Lewycky | 893a6ea | 2012-04-03 20:26:45 +0000 | [diff] [blame] | 46 | // CHECK: ObjCIvarDecl:{ResultType double}{TypedText _prop4} (35) |