StmtPrinter: factor out arg printing code to PrintCallArgs
[clang.git] / test / CodeGenObjCXX / implicit-copy-assign-operator.mm
blob16ae1472ddfd3f41f47cdb1967f172f7d06597d5
1 // RUN: %clang_cc1 -fobjc-gc -emit-llvm -triple x86_64-apple-darwin10.0.0 -o - %s | FileCheck %s
2 struct A { 
3   A &operator=(const A&);
4   A &operator=(A&);
5 };
7 struct B {
8   B &operator=(B&);
9 };
11 struct C {
12   virtual C& operator=(const C&);
15 struct POD {
16   id myobjc;
17   int array[3][4];
20 struct CopyByValue {
21   CopyByValue(const CopyByValue&);
22   CopyByValue &operator=(CopyByValue);
25 struct D : A, B, virtual C { 
26   int scalar;
27   int scalar_array[2][3];
28   B class_member;
29   C class_member_array[2][3];
30   POD pod_array[2][3];
32   union {
33     int x;
34     float f[3];
35   };
37   CopyByValue by_value;
40 void test_D(D d1, D d2) {
41   d1 = d2;
44 // CHECK: define linkonce_odr %struct.D* @_ZN1DaSERS_
45 // CHECK: {{call.*_ZN1AaSERS_}}
46 // CHECK: {{call.*_ZN1BaSERS_}}
47 // CHECK: {{call.*_ZN1CaSERKS_}}
48 // CHECK: {{call void @llvm.memcpy.p0i8.p0i8.i64.*i64 24}}
49 // CHECK: {{call.*_ZN1BaSERS_}}
50 // CHECK: br
51 // CHECK: {{call.*_ZN1CaSERKS_}}
52 // CHECK: {{call.*@objc_memmove_collectable}}
53 // CHECK: {{call void @llvm.memcpy.p0i8.p0i8.i64.*i64 12}}
54 // CHECK: call void @_ZN11CopyByValueC1ERKS_
55 // CHECK: {{call.*_ZN11CopyByValueaSES_}}
56 // CHECK: ret