1 // RUN: %clang_cc1 -w -triple=x86_64-pc-win32 -fms-compatibility -fdump-record-layouts-simple -foverride-record-layout=%S/Inputs/override-bit-field-layout.layout %s | FileCheck %s 2 3 // CHECK: Type: struct S1 4 // CHECK: FieldOffsets: [0, 11] 5 struct S1 { 6 short a : 3; 7 short b : 5; 8 }; 9 10 // CHECK: Type: struct S2 11 // CHECK: FieldOffsets: [64] 12 struct S2 { 13 virtual ~S2() = default; 14 short a : 3; 15 }; 16 17 // CHECK: Type: struct S3 18 // CHECK: Size:32 19 // CHECK: FieldOffsets: [0, 1] 20 struct S3 { 21 int a : 1; 22 int b : 2; 23 }; 24 25 // CHECK: Type: struct S4 26 // CHECK: FieldOffsets: [32] 27 struct S4 : S3 { 28 char c; 29 }; 30 use_structs()31void use_structs() { 32 S1 s1s[sizeof(S1)]; 33 S2 s2s[sizeof(S2)]; 34 S3 s3s[sizeof(S3)]; 35 S4 s4s[sizeof(S4)]; 36 } 37