[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / Layout / ms-x86-misalignedarray.cpp
blob81e626d2fc3f37e766bcf66fc05335faeb713bad
1 // RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple i686-pc-win32 -fdump-record-layouts -fsyntax-only %s 2>&1 \
2 // RUN: | FileCheck %s
3 // RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple x86_64-pc-win32 -fdump-record-layouts -fsyntax-only %s 2>/dev/null \
4 // RUN: | FileCheck %s -check-prefix CHECK-X64
6 struct T0 { char c; };
7 struct T2 : virtual T0 { };
8 struct T3 { T2 a[1]; char c; };
10 // CHECK: *** Dumping AST Record Layout
11 // CHECK: *** Dumping AST Record Layout
12 // CHECK: *** Dumping AST Record Layout
13 // CHECK-NEXT: 0 | struct T3
14 // CHECK-NEXT: 0 | T2[1] a
15 // CHECK-NEXT: 5 | char c
16 // CHECK-NEXT: | [sizeof=8, align=4
17 // CHECK-NEXT: | nvsize=8, nvalign=4]
18 // CHECK-X64: *** Dumping AST Record Layout
19 // CHECK-X64: *** Dumping AST Record Layout
20 // CHECK-X64: *** Dumping AST Record Layout
21 // CHECK-X64-NEXT: 0 | struct T3
22 // CHECK-X64-NEXT: 0 | T2[1] a
23 // CHECK-X64-NEXT: 16 | char c
24 // CHECK-X64-NEXT: | [sizeof=24, align=8
25 // CHECK-X64-NEXT: | nvsize=24, nvalign=8]
27 int a[sizeof(T3)];