1// XFAIL: *
2
3// RUN: %clang --target=x86_64-apple-macosx -c -gdwarf -o %t %s
4// RUN: %lldb %t \
5// RUN: -o "expr alignof(OverlappingFields)" \
6// RUN: -o "expr sizeof(OverlappingFields)" \
7// RUN: -o exit | FileCheck %s
8
9// CHECK: (lldb) expr alignof(OverlappingFields)
10// CHECK-NEXT: ${{.*}} = 4
11// CHECK: (lldb) expr sizeof(OverlappingFields)
12// CHECK-NEXT: ${{.*}} = 8
13
14struct Empty {};
15
16struct OverlappingFields {
17 char y;
18 [[no_unique_address]] Empty e;
19 int z;
20} g_overlapping_struct;
21static_assert(alignof(OverlappingFields) == 4);
22static_assert(sizeof(OverlappingFields) == 8);
23
24int main() {}
25

source code of lldb/test/Shell/SymbolFile/DWARF/x86/no_unique_address-alignment.cpp