aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/copy-constructor-synthesis.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-08-10 18:34:26 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-08-10 18:34:26 +0000
commitf05fe65e64a5de93ba6d30e1b830fd0fc36358e9 (patch)
treecee04c3234a52f312f27e9ddf564d895e0090e8c /test/CodeGenCXX/copy-constructor-synthesis.cpp
parentb98f05c7389a5426c54f0e864043bb34862fa4e7 (diff)
ir-gen for generating copying of scalar data members in
a synthesized copy constructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78580 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/copy-constructor-synthesis.cpp')
-rw-r--r--test/CodeGenCXX/copy-constructor-synthesis.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/test/CodeGenCXX/copy-constructor-synthesis.cpp b/test/CodeGenCXX/copy-constructor-synthesis.cpp
index a993926f19..851a4ea60a 100644
--- a/test/CodeGenCXX/copy-constructor-synthesis.cpp
+++ b/test/CodeGenCXX/copy-constructor-synthesis.cpp
@@ -26,12 +26,21 @@ struct P {
struct X : M, N, P { // ...
- X(){}
+ X() : f1(1.0), d1(2.0), i1(3), name("HELLO"), bf1(0xff), bf2(0xabcd) {}
P p0;
void pr() { printf("iM = %d iN = %d, m1.iM = %d\n", iM, iN, m1.iM);
- printf("im = %d p0.iP = %d, p1.iP = %d\n", iP, p0.iP, p1.iP); }
+ printf("im = %d p0.iP = %d, p1.iP = %d\n", iP, p0.iP, p1.iP);
+ printf("f1 = %f d1 = %f i1 = %d name(%s) \n", f1, d1, i1, name);
+ printf("bf1 = %x bf2 = %x\n", bf1, bf2);
+ }
M m1;
P p1;
+ float f1;
+ double d1;
+ int i1;
+ const char *name;
+ unsigned bf1 : 8;
+ unsigned bf2 : 16;
};
int main()