1 // RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 | FileCheck %s
8 void f(const T
& t
= T());
13 X(const X
&, const T
& t
= T());
16 // CHECK-LABEL: define{{.*}} void @_Z1gv()
18 // CHECK: call void @_ZN1TC1Ev(ptr {{[^,]*}} [[AGG1:%.*]])
19 // CHECK-NEXT: call void @_Z1fRK1T(ptr noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) [[AGG1]])
20 // CHECK-NEXT: call void @_ZN1TD1Ev(ptr {{[^,]*}} [[AGG1]])
23 // CHECK-NEXT: call void @_ZN1TC1Ev(ptr {{[^,]*}} [[AGG2:%.*]])
24 // CHECK-NEXT: call void @_Z1fRK1T(ptr noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) [[AGG2]])
25 // CHECK-NEXT: call void @_ZN1TD1Ev(ptr {{[^,]*}} [[AGG2]])
28 // CHECK-NEXT: call void @_ZN1XC1Ev(
31 // CHECK-NEXT: call void @_ZN1TC1Ev(
32 // CHECK-NEXT: call void @_ZN1XC1ERKS_RK1T(
33 // CHECK-NEXT: call void @_ZN1TD1Ev(
36 // CHECK-NEXT: call void @_ZN1TC1Ev(
37 // CHECK-NEXT: call void @_ZN1XC1ERKS_RK1T(
38 // CHECK-NEXT: call void @_ZN1TD1Ev(
43 class obj
{ int a
; float b
; double d
; };
44 // CHECK-LABEL: define{{.*}} void @_Z1hv()
46 // CHECK: call void @llvm.memset.p0.i64(
50 // PR7028 - mostly this shouldn't crash
53 struct B
{ B(); ~B(); };
56 C(const B
&file
= B());
58 C::C(const B
&file
) {}
64 // CHECK-LABEL: define linkonce_odr void @_ZN5test11DC2Ev(ptr {{[^,]*}} %this) unnamed_addr
65 // CHECK: call void @_ZN5test11BC1Ev(
66 // CHECK-NEXT: call void @_ZN5test11CC1ERKNS_1BE(
67 // CHECK-NEXT: call void @_ZN5test11BD1Ev(
68 // CHECK: call void @_ZN5test11AC1Ev(
76 // CHECK: define linkonce_odr void @_ZN5test21AIiED2Ev(
77 template <typename T
> struct A
{ A() {} ~A() {} };
78 template <typename
> void f(const A
<int> & = {}) {}
79 void g() { f
<int>(); }