25 lines · cpp
1// XFAIL: *2 3// RUN: %clang --target=x86_64-apple-macosx -c -gdwarf -o %t %s4// RUN: %lldb %t \5// RUN: -o "expr alignof(OverlappingFields)" \6// RUN: -o "expr sizeof(OverlappingFields)" \7// RUN: -o exit | FileCheck %s8 9// CHECK: (lldb) expr alignof(OverlappingFields)10// CHECK-NEXT: ${{.*}} = 411// CHECK: (lldb) expr sizeof(OverlappingFields)12// CHECK-NEXT: ${{.*}} = 813 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