Argyrios Kyrtzidis | e99b084 | 2012-05-25 20:05:57 +0000 | [diff] [blame] | 1 | |
| 2 | @class Protocol; |
| 3 | |
| 4 | @protocol Prot |
| 5 | @end |
| 6 | |
| 7 | struct FooS { |
| 8 | int x; |
| 9 | }; |
| 10 | |
| 11 | void foo() { |
| 12 | Protocol *p = @protocol(Prot); |
| 13 | @encode(struct FooS); |
| 14 | } |
| 15 | |
Argyrios Kyrtzidis | fe6a012 | 2013-05-06 19:08:57 +0000 | [diff] [blame] | 16 | @interface I |
| 17 | +(void)clsMeth; |
| 18 | @end |
| 19 | |
| 20 | void foo2() { |
| 21 | [I clsMeth]; |
| 22 | } |
| 23 | |
Argyrios Kyrtzidis | 542f38f | 2016-03-09 02:12:46 +0000 | [diff] [blame] | 24 | @protocol ForwardProt; |
| 25 | |
Argyrios Kyrtzidis | e99b084 | 2012-05-25 20:05:57 +0000 | [diff] [blame] | 26 | // RUN: c-index-test -index-file %s | FileCheck %s |
| 27 | // CHECK: [indexEntityReference]: kind: objc-protocol | name: Prot | {{.*}} | loc: 12:27 |
| 28 | // CHECK: [indexEntityReference]: kind: struct | name: FooS | {{.*}} | loc: 13:18 |
Argyrios Kyrtzidis | fe6a012 | 2013-05-06 19:08:57 +0000 | [diff] [blame] | 29 | // CHECK: [indexEntityReference]: kind: objc-class | name: I | {{.*}} | loc: 21:4 |
Argyrios Kyrtzidis | 542f38f | 2016-03-09 02:12:46 +0000 | [diff] [blame] | 30 | |
| 31 | // CHECK: [indexDeclaration]: kind: objc-protocol | name: ForwardProt | {{.*}} | loc: 24:11 |
| 32 | // CHECK-NEXT: <ObjCContainerInfo>: kind: forward-ref |