Argyrios Kyrtzidis | 8a4bfaa | 2011-08-10 21:12:04 +0000 | [diff] [blame] | 1 | // Test is line- and column-sensitive. Run lines are below. |
| 2 | |
| 3 | @interface rdar9771715 |
| 4 | @property (readonly) int foo1; |
| 5 | @property (readwrite) int foo2; |
| 6 | @end |
| 7 | |
Argyrios Kyrtzidis | 3422fbc | 2011-08-15 18:44:43 +0000 | [diff] [blame] | 8 | @class Foo; |
| 9 | |
| 10 | @interface rdar9535717 { |
| 11 | __weak Foo *foo; |
| 12 | } |
| 13 | @end |
| 14 | |
Argyrios Kyrtzidis | 75cf3e8 | 2011-08-17 19:25:08 +0000 | [diff] [blame] | 15 | @interface Test1 { |
| 16 | id _name; |
| 17 | } |
| 18 | @end |
| 19 | @interface Test1 () |
| 20 | - (id)name; |
| 21 | @end |
| 22 | @interface Test1 () |
| 23 | @property (copy) id name; |
| 24 | @end |
| 25 | @implementation Test1 |
| 26 | @synthesize name = _name; |
| 27 | @end |
| 28 | |
Argyrios Kyrtzidis | 644af7b | 2012-02-23 21:11:20 +0000 | [diff] [blame] | 29 | @interface rdar10902015 |
| 30 | @end |
| 31 | |
| 32 | @implementation rdar10902015 |
| 33 | |
Argyrios Kyrtzidis | 66373dd | 2012-03-30 00:19:05 +0000 | [diff] [blame^] | 34 | struct S { int x; }; |
Argyrios Kyrtzidis | 644af7b | 2012-02-23 21:11:20 +0000 | [diff] [blame] | 35 | |
| 36 | -(void)mm:(struct S*)s { |
| 37 | rdar10902015 *i = 0; |
Argyrios Kyrtzidis | 66373dd | 2012-03-30 00:19:05 +0000 | [diff] [blame^] | 38 | s->x = 0; |
Argyrios Kyrtzidis | 644af7b | 2012-02-23 21:11:20 +0000 | [diff] [blame] | 39 | } |
| 40 | @end |
| 41 | |
Argyrios Kyrtzidis | 75cf3e8 | 2011-08-17 19:25:08 +0000 | [diff] [blame] | 42 | // RUN: c-index-test -cursor-at=%s:4:28 -cursor-at=%s:5:28 %s | FileCheck -check-prefix=CHECK-PROP %s |
| 43 | // CHECK-PROP: ObjCPropertyDecl=foo1:4:26 |
| 44 | // CHECK-PROP: ObjCPropertyDecl=foo2:5:27 |
Argyrios Kyrtzidis | 3422fbc | 2011-08-15 18:44:43 +0000 | [diff] [blame] | 45 | |
Sebastian Pop | 9ec60df | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 46 | // RUN: c-index-test -cursor-at=%s:11:11 %s -target x86_64-apple-macosx10.7.0 | FileCheck -check-prefix=CHECK-WITH-WEAK %s |
Argyrios Kyrtzidis | 3422fbc | 2011-08-15 18:44:43 +0000 | [diff] [blame] | 47 | // CHECK-WITH-WEAK: ObjCClassRef=Foo:8:8 |
Argyrios Kyrtzidis | 75cf3e8 | 2011-08-17 19:25:08 +0000 | [diff] [blame] | 48 | |
| 49 | // RUN: c-index-test -cursor-at=%s:20:10 %s | FileCheck -check-prefix=CHECK-METHOD %s |
Argyrios Kyrtzidis | 66373dd | 2012-03-30 00:19:05 +0000 | [diff] [blame^] | 50 | // CHECK-METHOD: 20:7 ObjCInstanceMethodDecl=name:20:7 Extent=[20:1 - 20:12] |
Argyrios Kyrtzidis | 644af7b | 2012-02-23 21:11:20 +0000 | [diff] [blame] | 51 | |
| 52 | // RUN: c-index-test -cursor-at=%s:37:17 %s | FileCheck -check-prefix=CHECK-IN-IMPL %s |
| 53 | // CHECK-IN-IMPL: VarDecl=i:37:17 |
Argyrios Kyrtzidis | 66373dd | 2012-03-30 00:19:05 +0000 | [diff] [blame^] | 54 | |
| 55 | // RUN: c-index-test -cursor-at=%s:38:6 -cursor-at=%s:40:11 %s | FileCheck -check-prefix=CHECK-MEMBERREF %s |
| 56 | // CHECK-MEMBERREF: 38:6 MemberRefExpr=x:34:16 SingleRefName=[38:6 - 38:7] RefName=[38:6 - 38:7] Extent=[38:3 - 38:7] |