[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / Layout / aix-bitfield-alignment.cpp
blobb9694c80bdc0f0c3814fb5108c7a25800f77ba85
1 // RUN: %clang_cc1 -triple powerpc-ibm-aix-xcoff -fdump-record-layouts \
2 // RUN: -fsyntax-only -fxl-pragma-pack -x c++ %s | \
3 // RUN: FileCheck --check-prefixes=CHECK %s
5 // RUN: %clang_cc1 -triple powerpc64-ibm-aix-xcoff -fdump-record-layouts \
6 // RUN: -fsyntax-only -fxl-pragma-pack -x c++ %s | \
7 // RUN: FileCheck --check-prefixes=CHECK %s
9 struct A {
10 bool b : 3;
13 int a = sizeof(A);
15 // CHECK: *** Dumping AST Record Layout
16 // CHECK-NEXT: 0 | struct A
17 // CHECK-NEXT: 0:0-2 | _Bool b
18 // CHECK-NEXT: | [sizeof=4, dsize=4, align=4, preferredalign=4,
19 // CHECK-NEXT: | nvsize=4, nvalign=4, preferrednvalign=4]
21 enum class Bool : bool { False = 0,
22 True = 1 };
24 struct B {
25 Bool b : 1;
28 int b = sizeof(B);
30 // CHECK: *** Dumping AST Record Layout
31 // CHECK-NEXT: 0 | struct B
32 // CHECK-NEXT: 0:0-0 | Bool b
33 // CHECK-NEXT: | [sizeof=4, dsize=4, align=4, preferredalign=4,
34 // CHECK-NEXT: | nvsize=4, nvalign=4, preferrednvalign=4]
36 enum LL : unsigned long long { val = 1 };