2012-05-26 04:05:57 +08:00
|
|
|
|
|
|
|
@class Protocol;
|
|
|
|
|
|
|
|
@protocol Prot
|
|
|
|
@end
|
|
|
|
|
|
|
|
struct FooS {
|
|
|
|
int x;
|
|
|
|
};
|
|
|
|
|
|
|
|
void foo() {
|
|
|
|
Protocol *p = @protocol(Prot);
|
|
|
|
@encode(struct FooS);
|
|
|
|
}
|
|
|
|
|
2013-05-07 03:08:57 +08:00
|
|
|
@interface I
|
|
|
|
+(void)clsMeth;
|
|
|
|
@end
|
|
|
|
|
|
|
|
void foo2() {
|
|
|
|
[I clsMeth];
|
|
|
|
}
|
|
|
|
|
2016-03-09 10:12:46 +08:00
|
|
|
@protocol ForwardProt;
|
|
|
|
|
2012-05-26 04:05:57 +08:00
|
|
|
// RUN: c-index-test -index-file %s | FileCheck %s
|
|
|
|
// CHECK: [indexEntityReference]: kind: objc-protocol | name: Prot | {{.*}} | loc: 12:27
|
|
|
|
// CHECK: [indexEntityReference]: kind: struct | name: FooS | {{.*}} | loc: 13:18
|
2013-05-07 03:08:57 +08:00
|
|
|
// CHECK: [indexEntityReference]: kind: objc-class | name: I | {{.*}} | loc: 21:4
|
2016-03-09 10:12:46 +08:00
|
|
|
|
|
|
|
// CHECK: [indexDeclaration]: kind: objc-protocol | name: ForwardProt | {{.*}} | loc: 24:11
|
|
|
|
// CHECK-NEXT: <ObjCContainerInfo>: kind: forward-ref
|