1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s -std=c++11 | FileCheck %s
17 C(C
& other
, A a
= A());
25 struct D
: A
, B
, virtual C
{
28 int scalar_array
[2][3];
30 C class_member_array
[2][3];
43 // CHECK-LABEL: define linkonce_odr void @_ZN1DC1ERS_(ptr {{[^,]*}} %this, ptr noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) unnamed_addr
44 // CHECK: call void @_ZN1AC1Ev
45 // CHECK: call void @_ZN1CC2ERS_1A
46 // CHECK: call void @_ZN1AD1Ev
47 // CHECK: call void @_ZN1AC2ERS_
48 // CHECK: call void @_ZN1BC2ERS_
49 // CHECK: {{call void @llvm.memcpy.p0.p0.i64.*i64 28}}
50 // CHECK: call void @_ZN1BC1ERS_
52 // CHECK: call void @_ZN1AC1Ev
53 // CHECK: call void @_ZN1CC1ERS_1A
54 // CHECK: call void @_ZN1AD1Ev
55 // CHECK: {{icmp eq.*, 3}}
57 // CHECK: {{icmp eq.*, 2}}
59 // CHECK: {{call void @llvm.memcpy.p0.p0.i64.*i64 300}}
63 template<class T
> struct X0
{ void f0(T
* ) { } };
64 template <class > struct X1
{ X1( X1
& , int = 0 ) { } };
65 struct X2
{ X1
<int> result
; };
69 typedef X0
<impl
> pimpl
;
72 pdata
.f0( new impl(*i
));
76 struct A
{ A(const A
&); A
&operator=(const A
&); };
77 struct B
{ A a
; unsigned : 0; };
78 void test(const B
&x
) {
85 // When determining whether to implement an array copy as a memcpy, look at
86 // whether the *selected* constructor is trivial.
90 S(const S
&) = default;
92 // CHECK: @_ZN5test42f1
95 // CHECK: call void @_ZN5test41SC1ERS0_
100 // CHECK: @_ZN5test42f2
102 // CHECK-NOT: call void @_ZN5test41SC1ERS0_
104 // CHECK-NOT: call void @_ZN5test41SC1ERS0_