[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / Layout / itanium-pack-and-align.cpp
blob94a35448db61a0c7bbe4195254e41a1da0e75ed6
1 // RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm-only -fdump-record-layouts %s \
2 // RUN: | FileCheck %s
4 struct S {
5 char x;
6 int y;
7 } __attribute__((packed, aligned(8)));
9 struct alignas(8) T {
10 char x;
11 int y;
12 } __attribute__((packed));
14 S s;
15 T t;
16 // CHECK: 0 | struct T
17 // CHECK-NEXT: 0 | char x
18 // CHECK-NEXT: 1 | int y
19 // CHECK-NEXT: | [sizeof=8, dsize=8, align=8,{{( preferredalign=8,)?}}
20 // CHECK-NEXT: | nvsize=8, nvalign=8{{(, preferrednvalign=8)?}}]
22 // CHECK: 0 | struct S
23 // CHECK-NEXT: 0 | char x
24 // CHECK-NEXT: 1 | int y
25 // CHECK-NEXT: | [sizeof=8, dsize=8, align=8,{{( preferredalign=8,)?}}
26 // CHECK-NEXT: | nvsize=8, nvalign=8{{(, preferrednvalign=8)?}}]