| // RUN: %clang_cc1 -w -fdump-record-layouts-simple %s > %t.layouts |
| // RUN: %clang_cc1 -w -fdump-record-layouts-simple %s > %t.before |
| // RUN: %clang_cc1 -w -DPACKED= -DALIGNED16= -fdump-record-layouts-simple -foverride-record-layout=%t.layouts %s > %t.after |
| // RUN: diff -u %t.before %t.after |
| // RUN: FileCheck %s < %t.after |
| // If not explicitly disabled, set PACKED to the packed attribute. |
| # define PACKED __attribute__((packed)) |
| // CHECK: Type: struct X0 |
| struct X0 : public Empty1 { |
| // CHECK: Type: struct X1 |
| struct X1 : public X0, public Empty2 { |
| // CHECK: Type: struct X2 |
| struct PACKED X2 : public X1, public X0, public Empty1 { |
| // CHECK: Type: struct X3 |
| struct PACKED X3 : virtual public X1, public X0 { |
| // CHECK: Type: struct X4 |
| // CHECK: Type: struct X5 |
| // CHECK: Type: struct X6 |
| struct __attribute__((aligned(16))) X6 { |
| // CHECK: Type: struct X7 |
| // CHECK: Type: struct X8 |
| struct X8 : X6, virtual X7 { |