1 // RUN: %clang_cc1 --std=c++17 -emit-llvm %s -o - -triple x86_64-unknown-linux-gnu | FileCheck %s
3 struct non_trivial_constructor
{
4 constexpr non_trivial_constructor() : x(100) { }
10 non_trivial_constructor b
;
13 union UnionNonTrivial
{
15 non_trivial_constructor b
{};
23 // CHECK: define dso_local void @_Z1fv()
24 // CHECK: call void @_ZN8UnionIntC1Ev
25 // CHECK-NEXT: call void @_ZN15UnionNonTrivialC1Ev
27 // CHECK: define {{.*}}void @_ZN8UnionIntC1Ev
28 // CHECK: call void @_ZN8UnionIntC2Ev
30 // CHECK: define {{.*}}void @_ZN15UnionNonTrivialC1Ev
31 // CHECK: call void @_ZN15UnionNonTrivialC2Ev
33 // CHECK: define {{.*}}void @_ZN8UnionIntC2Ev
34 // CHECK: store i32 1000
36 // CHECK: define {{.*}}void @_ZN15UnionNonTrivialC2Ev
37 // CHECK: call void @_ZN23non_trivial_constructorC1Ev