From: Fariborz Jahanian Date: Thu, 13 Aug 2009 21:38:50 +0000 (+0000) Subject: More complete test for my previous patch. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6dee5d81a6d43b1ff03fe47ab180a45bee44b371;p=clang More complete test for my previous patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78941 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CodeGenCXX/copy-assign-synthesis.cpp b/test/CodeGenCXX/copy-assign-synthesis.cpp index 0677ac9bbb..7e4c14c0b6 100644 --- a/test/CodeGenCXX/copy-assign-synthesis.cpp +++ b/test/CodeGenCXX/copy-assign-synthesis.cpp @@ -3,7 +3,45 @@ extern "C" int printf(...); -struct X { +struct B { + B() : B1(3.14), B2(3.15) {} + float B1; + float B2; + void pr() { + printf("B1 = %f B2 = %f\n", B1, B2); + } +}; + +struct M { + M() : M1(10), M2(11) {} + int M1; + int M2; + void pr() { + printf("M1 = %d M2 = %d\n", M1, M2); + } +}; + +struct N : B { + N() : N1(20), N2(21) {} + int N1; + int N2; + void pr() { + printf("N1 = %d N2 = %d\n", N1, N2); + B::pr(); + } +}; + +struct Q { + Q() : Q1(30), Q2(31) {} + int Q1; + int Q2; + void pr() { + printf("Q1 = %d Q2 = %d\n", Q1, Q2); + } +}; + + +struct X : M , N { X() : d(0.0), d1(1.1), d2(1.2), d3(1.3) {} double d; double d1; @@ -11,7 +49,11 @@ struct X { double d3; void pr() { printf("d = %f d1 = %f d2 = %f d3 = %f\n", d, d1,d2,d3); + M::pr(); N::pr(); + q1.pr(); q2.pr(); } + + Q q1, q2; };