aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/copy-assign-synthesis.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-08-13 21:47:21 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-08-13 21:47:21 +0000
commiteea0a5c6e347842fcfdd371f27c0e3b8fc644ee7 (patch)
tree7b88ddbbedb7d4b16d0278640be80ea0fba5c7de /test/CodeGenCXX/copy-assign-synthesis.cpp
parent6dee5d81a6d43b1ff03fe47ab180a45bee44b371 (diff)
Adds testing of copy assignment of anonymous union
data members. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78943 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/copy-assign-synthesis.cpp')
-rw-r--r--test/CodeGenCXX/copy-assign-synthesis.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/test/CodeGenCXX/copy-assign-synthesis.cpp b/test/CodeGenCXX/copy-assign-synthesis.cpp
index 7e4c14c0b6..f9baa8f03f 100644
--- a/test/CodeGenCXX/copy-assign-synthesis.cpp
+++ b/test/CodeGenCXX/copy-assign-synthesis.cpp
@@ -4,21 +4,30 @@
extern "C" int printf(...);
struct B {
- B() : B1(3.14), B2(3.15) {}
+ B() : B1(3.14), B2(3.15), auB2(3.16) {}
float B1;
float B2;
void pr() {
- printf("B1 = %f B2 = %f\n", B1, B2);
+ printf("B1 = %f B2 = %f auB1 = %f\n", B1, B2, auB1);
}
+
+ union {
+ float auB1;
+ float auB2;
+ };
};
struct M {
- M() : M1(10), M2(11) {}
+ M() : M1(10), M2(11) , auM1(12) {}
int M1;
int M2;
void pr() {
- printf("M1 = %d M2 = %d\n", M1, M2);
+ printf("M1 = %d M2 = %d auM1 = %d auM2 = %d\n", M1, M2, auM1, auM2);
}
+ union {
+ int auM1;
+ int auM2;
+ };
};
struct N : B {