Home | History | Annotate | Download | only in Index
      1 union S {
      2   unsigned ac : 4;
      3   unsigned : 4;
      4   unsigned clock : 1;
      5   unsigned : 0;
      6   unsigned flag : 1;
      7 };
      8 
      9 struct X {
     10   unsigned light : 1;
     11   unsigned toaster : 1;
     12   int count;
     13   union S stat;
     14 };
     15 
     16 // RUN: c-index-test -test-print-bitwidth %s | FileCheck %s
     17 // CHECK: FieldDecl=ac:2:12 (Definition) bitwidth=4
     18 // CHECK: FieldDecl=:3:3 (Definition) bitwidth=4
     19 // CHECK: FieldDecl=clock:4:12 (Definition) bitwidth=1
     20 // CHECK: FieldDecl=:5:3 (Definition) bitwidth=0
     21 // CHECK: FieldDecl=flag:6:12 (Definition) bitwidth=1
     22 // CHECK: FieldDecl=light:10:12 (Definition) bitwidth=1
     23 // CHECK: FieldDecl=toaster:11:12 (Definition) bitwidth=1
     24 // CHECK-NOT: count
     25 // CHECK-NOT: stat
     26