summaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/member-init-struct.cpp
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2009-11-18 14:59:57 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2009-11-18 14:59:57 +0000
commitb3d5a323a5ca92ea73443499cee2f15db1ff0fb3 (patch)
tree60a1694bec5a44d15456acc880cb2f91619f66aa /test/CodeGenCXX/member-init-struct.cpp
parent8f57cb0305232cb53fff00ef151ca716766f3437 (diff)
Notes
Diffstat (limited to 'test/CodeGenCXX/member-init-struct.cpp')
-rw-r--r--test/CodeGenCXX/member-init-struct.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CodeGenCXX/member-init-struct.cpp b/test/CodeGenCXX/member-init-struct.cpp
new file mode 100644
index 000000000000..9c0c3919794e
--- /dev/null
+++ b/test/CodeGenCXX/member-init-struct.cpp
@@ -0,0 +1,18 @@
+// RUN: clang-cc %s -emit-llvm-only -verify
+
+struct A {int a;};
+struct B {float a;};
+struct C {
+ union {
+ A a;
+ B b[10];
+ };
+ _Complex float c;
+ int d[10];
+ void (C::*e)();
+ C() : a(), c(), d(), e() {}
+ C(A x) : a(x) {}
+ C(void (C::*x)(), int y) : b(), c(y), e(x) {}
+};
+A x;
+C a, b(x), c(0, 2);