| 1 | // RUN: %clang_cc1 -w -triple=x86_64-pc-win32 -fms-compatibility -fdump-record-layouts-simple -foverride-record-layout=%S/Inputs/override-layout-virtual-base.layout %s | FileCheck %s |
|---|---|
| 2 | |
| 3 | struct S1 { |
| 4 | int a; |
| 5 | }; |
| 6 | |
| 7 | struct S2 : virtual S1 { |
| 8 | virtual void foo() {} |
| 9 | }; |
| 10 | |
| 11 | // CHECK: Type: struct S3 |
| 12 | // CHECK: FieldOffsets: [128] |
| 13 | struct S3 : S2 { |
| 14 | char b; |
| 15 | }; |
| 16 | |
| 17 | void use_structs() { |
| 18 | S1 s1s[sizeof(S1)]; |
| 19 | S2 s2s[sizeof(S2)]; |
| 20 | S3 s3s[sizeof(S3)]; |
| 21 | } |
| 22 |