================ @@ -0,0 +1,11 @@ +// RUN: %clang_cc1 %s -emit-llvm -triple x86_64-linux-gnu -o - | FileCheck %s --check-prefixes=CHECK +// RUN: %clang_cc1 -x c++ %s -emit-llvm -triple x86_64-linux-gnu -o - | FileCheck %s --check-prefixes=CHECK-CXX + +union Foo { + struct Empty {} val; +}; + +union Foo foo = {}; + +// CHECK: @foo = {{.*}}global %union.Foo undef, align 1 ---------------- Michael137 wrote:
Does this seem reasonable to you @efriedma-quic? Essentially this is treated as if we had written: ``` union Foo { [[no_unique_address]] struct Empty {} val; }; union Foo foo = {}; ``` https://github.com/llvm/llvm-project/pull/109271 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits