diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-11-16 23:53:01 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-11-16 23:53:01 +0000 |
commit | 4d26b43f7c6fc9d2974da7e7389337fe32dc29d0 (patch) | |
tree | 93eb433cf93005189c415f40632853717dbd9341 /test/CodeGenCXX/member-init-struct.cpp | |
parent | 39f36e37f53bfec22a4bc2a594f2dd314395c86c (diff) |
Fix up EmitMemberInitializer to handle many more cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88999 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/member-init-struct.cpp')
-rw-r--r-- | test/CodeGenCXX/member-init-struct.cpp | 18 |
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 0000000000..9c0c391979 --- /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); |