Home | History | Annotate | Download | only in Index
      1 struct _MyS {
      2   int foo;
      3 } MyS;
      4 
      5 struct _MyS ww;
      6 
      7 int x, y;
      8 
      9 typedef union {
     10   struct {
     11     int field : 16;
     12   };
     13 } r_t;
     14 
     15 void test() {
     16   r_t reg;
     17   reg.field = 1;
     18 }
     19 
     20 // RUN: c-index-test -cursor-at=%s:1:9 \
     21 // RUN:              -cursor-at=%s:2:9 \
     22 // RUN:              -cursor-at=%s:5:9 \
     23 // RUN:              -cursor-at=%s:7:5 \
     24 // RUN:              -cursor-at=%s:7:8 \
     25 // RUN:              -cursor-at=%s:17:8 \
     26 // RUN:       %s | FileCheck %s
     27 
     28 // CHECK: StructDecl=_MyS:1:8 (Definition)
     29 // CHECK: FieldDecl=foo:2:7 (Definition)
     30 // CHECK: TypeRef=struct _MyS:1:8
     31 // CHECK: VarDecl=x:7:5
     32 // CHECK: VarDecl=y:7:8
     33 // CHECK: 17:7 MemberRefExpr=field:11:9