xref: /minix3/external/bsd/llvm/dist/clang/test/Index/get-cursor.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc struct _MyS {
2*f4a2713aSLionel Sambuc   int foo;
3*f4a2713aSLionel Sambuc } MyS;
4*f4a2713aSLionel Sambuc 
5*f4a2713aSLionel Sambuc struct _MyS ww;
6*f4a2713aSLionel Sambuc 
7*f4a2713aSLionel Sambuc int x, y;
8*f4a2713aSLionel Sambuc 
9*f4a2713aSLionel Sambuc // RUN: c-index-test -cursor-at=%s:1:9 \
10*f4a2713aSLionel Sambuc // RUN:              -cursor-at=%s:2:9 \
11*f4a2713aSLionel Sambuc // RUN:              -cursor-at=%s:5:9 \
12*f4a2713aSLionel Sambuc // RUN:              -cursor-at=%s:7:5 \
13*f4a2713aSLionel Sambuc // RUN:              -cursor-at=%s:7:8 \
14*f4a2713aSLionel Sambuc // RUN:       %s | FileCheck %s
15*f4a2713aSLionel Sambuc 
16*f4a2713aSLionel Sambuc // CHECK: StructDecl=_MyS:1:8 (Definition)
17*f4a2713aSLionel Sambuc // CHECK: FieldDecl=foo:2:7 (Definition)
18*f4a2713aSLionel Sambuc // CHECK: TypeRef=struct _MyS:1:8
19*f4a2713aSLionel Sambuc // CHECK: VarDecl=x:7:5
20*f4a2713aSLionel Sambuc // CHECK: VarDecl=y:7:8
21