1 // RUN: %clang_cc1 %std_cxx98-14 -w -fdump-record-layouts-simple %s > %t.layouts
2 // RUN: %clang_cc1 %std_cxx98-14 -w -fdump-record-layouts-simple %s > %t.before
3 // RUN: %clang_cc1 %std_cxx98-14 -w -DPACKED= -DALIGNED16= -fdump-record-layouts-simple -foverride-record-layout=%t.layouts %s > %t.after
4 // RUN: diff -u %t.before %t.after
5 // RUN: FileCheck --check-prefixes=CHECK,PRE17 %s < %t.after
7 // RUN: %clang_cc1 -std=c++17 -w -fdump-record-layouts-simple %s > %t.layouts
8 // RUN: %clang_cc1 -std=c++17 -w -fdump-record-layouts-simple %s > %t.before
9 // RUN: %clang_cc1 -std=c++17 -w -DPACKED= -DALIGNED16= -fdump-record-layouts-simple -foverride-record-layout=%t.layouts %s > %t.after
10 // RUN: diff -u %t.before %t.after
11 // RUN: FileCheck --check-prefixes=CHECK,CXX17 %s < %t.after
13 // CXX17: Type: struct X6
15 // If not explicitly disabled, set PACKED to the packed attribute.
17 # define PACKED __attribute__((packed))
23 // CHECK: Type: struct X0
24 struct X0
: public Empty1
{
28 // CHECK: Type: struct X1
29 struct X1
: public X0
, public Empty2
{
34 // CHECK: Type: struct X2
35 struct PACKED X2
: public X1
, public X0
, public Empty1
{
40 // CHECK: Type: struct X3
41 struct PACKED X3
: virtual public X1
, public X0
{
46 // CHECK: Type: struct X4
65 // CHECK: Type: struct X5
75 // PRE17: Type: struct X6
76 struct __attribute__((aligned(16))) X6
{
82 // PRE17: Type: struct X7
87 // PRE17: Type: struct X8
88 struct X8
: X6
, virtual X7
{