blob: 46420ee0c7d35851ca6780380a9fadfeca9922c6 [file] [log] [blame]
Argyrios Kyrtzidisc2be04e2011-12-13 18:47:35 +00001
2#include "index-suppress-refs.h"
3
4#define TYPEDEF(x) typedef int x
5TYPEDEF(MyInt);
6
7MyInt gx;
8
9@class I;
10
11@interface I(cat)
12-(I*)meth;
13@end
14
15@class I;
16
Argyrios Kyrtzidis90fd67a2011-12-15 00:04:56 +000017@interface S : B<P>
18-(void)meth:(B*)b :(id<P>)p;
19@end
20
Argyrios Kyrtzidisc2be04e2011-12-13 18:47:35 +000021// 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 Kyrtzidis90fd67a2011-12-15 00:04:56 +000024// 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 Kyrtzidisc2be04e2011-12-13 18:47:35 +000028// 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 Kyrtzidis90fd67a2011-12-15 00:04:56 +000038// 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