Argyrios Kyrtzidis | c2be04e | 2011-12-13 18:47:35 +0000 | [diff] [blame] | 1 | |
| 2 | #include "index-suppress-refs.h" |
| 3 | |
| 4 | #define TYPEDEF(x) typedef int x |
| 5 | TYPEDEF(MyInt); |
| 6 | |
| 7 | MyInt gx; |
| 8 | |
| 9 | @class I; |
| 10 | |
| 11 | @interface I(cat) |
| 12 | -(I*)meth; |
| 13 | @end |
| 14 | |
| 15 | @class I; |
| 16 | |
Argyrios Kyrtzidis | 90fd67a | 2011-12-15 00:04:56 +0000 | [diff] [blame] | 17 | @interface S : B<P> |
| 18 | -(void)meth:(B*)b :(id<P>)p; |
| 19 | @end |
| 20 | |
Argyrios Kyrtzidis | c2be04e | 2011-12-13 18:47:35 +0000 | [diff] [blame] | 21 | // RUN: env CINDEXTEST_SUPPRESSREFS=1 c-index-test -index-file %s | FileCheck %s |
| 22 | // CHECK: [indexDeclaration]: kind: objc-class | name: I |
| 23 | // CHECK-NEXT: <ObjCContainerInfo>: kind: interface |
Argyrios Kyrtzidis | 90fd67a | 2011-12-15 00:04:56 +0000 | [diff] [blame] | 24 | // CHECK-NEXT: [indexDeclaration]: kind: objc-class | name: B |
| 25 | // CHECK-NEXT: <ObjCContainerInfo>: kind: interface |
| 26 | // CHECK-NEXT: [indexDeclaration]: kind: objc-protocol | name: P |
| 27 | // CHECK-NEXT: <ObjCContainerInfo>: kind: interface |
Argyrios Kyrtzidis | c2be04e | 2011-12-13 18:47:35 +0000 | [diff] [blame] | 28 | // CHECK-NEXT: [indexDeclaration]: kind: typedef | name: MyInt |
| 29 | // CHECK-NEXT: [indexDeclaration]: kind: variable | name: gx |
| 30 | // CHECK-NEXT: [indexDeclaration]: kind: objc-class | name: I |
| 31 | // CHECK-NEXT: <ObjCContainerInfo>: kind: forward-ref |
| 32 | // CHECK-NEXT: [indexDeclaration]: kind: objc-category | name: cat |
| 33 | // CHECK-NEXT: <ObjCContainerInfo>: kind: interface |
| 34 | // CHECK-NEXT: <ObjCCategoryInfo>: class: kind: objc-class | name: I |
| 35 | // CHECK-NEXT: [indexDeclaration]: kind: objc-instance-method | name: meth |
| 36 | // CHECK-NOT: [indexEntityReference]: kind: objc-class | name: I |
| 37 | // CHECK-NOT: [indexDeclaration]: kind: objc-class | name: I |
Argyrios Kyrtzidis | 90fd67a | 2011-12-15 00:04:56 +0000 | [diff] [blame] | 38 | // CHECK-NEXT: [indexDeclaration]: kind: objc-class | name: S |
| 39 | // CHECK-NEXT: <ObjCContainerInfo>: kind: interface |
| 40 | // CHECK-NEXT: <base>: kind: objc-class | name: B |
| 41 | // CHECK-NEXT: <protocol>: kind: objc-protocol | name: P |
| 42 | // CHECK-NEXT: [indexDeclaration]: kind: objc-instance-method | name: meth:: |
| 43 | // CHECK-NOT: [indexEntityReference]: kind: objc-class | name: B |
| 44 | // CHECK-NOT: [indexEntityReference]: kind: objc-protocol | name: P |