xref: /minix3/external/bsd/llvm/dist/clang/test/Index/index-refs.m (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc
2*f4a2713aSLionel Sambuc@class Protocol;
3*f4a2713aSLionel Sambuc
4*f4a2713aSLionel Sambuc@protocol Prot
5*f4a2713aSLionel Sambuc@end
6*f4a2713aSLionel Sambuc
7*f4a2713aSLionel Sambucstruct FooS {
8*f4a2713aSLionel Sambuc  int x;
9*f4a2713aSLionel Sambuc};
10*f4a2713aSLionel Sambuc
11*f4a2713aSLionel Sambucvoid foo() {
12*f4a2713aSLionel Sambuc  Protocol *p = @protocol(Prot);
13*f4a2713aSLionel Sambuc  @encode(struct FooS);
14*f4a2713aSLionel Sambuc}
15*f4a2713aSLionel Sambuc
16*f4a2713aSLionel Sambuc@interface I
17*f4a2713aSLionel Sambuc+(void)clsMeth;
18*f4a2713aSLionel Sambuc@end
19*f4a2713aSLionel Sambuc
20*f4a2713aSLionel Sambucvoid foo2() {
21*f4a2713aSLionel Sambuc  [I clsMeth];
22*f4a2713aSLionel Sambuc}
23*f4a2713aSLionel Sambuc
24*f4a2713aSLionel Sambuc// RUN: c-index-test -index-file %s | FileCheck %s
25*f4a2713aSLionel Sambuc// CHECK: [indexEntityReference]: kind: objc-protocol | name: Prot | {{.*}} | loc: 12:27
26*f4a2713aSLionel Sambuc// CHECK: [indexEntityReference]: kind: struct | name: FooS | {{.*}} | loc: 13:18
27*f4a2713aSLionel Sambuc// CHECK: [indexEntityReference]: kind: objc-class | name: I | {{.*}} | loc: 21:4
28