diff options
author | John McCall <rjmccall@apple.com> | 2011-06-17 00:18:42 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-06-17 00:18:42 +0000 |
commit | b77115d7b988f55f961e24129a62f20dfd066a94 (patch) | |
tree | b6d864dd8c9c10b049c922ce8657470a5c4ce0ba /test/CodeGenCXX/implicit-copy-constructor.cpp | |
parent | 8d5e18c69e007f5d0f447b4a716088589a827857 (diff) |
When synthesizing implicit copy/move constructors and copy/move assignment
operators, don't make an initializer or sub-operation for zero-width
bitfields.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133221 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/implicit-copy-constructor.cpp')
-rw-r--r-- | test/CodeGenCXX/implicit-copy-constructor.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGenCXX/implicit-copy-constructor.cpp b/test/CodeGenCXX/implicit-copy-constructor.cpp index 500860182e..8bc84a534b 100644 --- a/test/CodeGenCXX/implicit-copy-constructor.cpp +++ b/test/CodeGenCXX/implicit-copy-constructor.cpp @@ -70,3 +70,13 @@ void test_X2() pimpl pdata; pdata.f0( new impl(*i)); } + +// rdar://problem/9598341 +namespace test3 { + struct A { A(const A&); A&operator=(const A&); }; + struct B { A a; unsigned : 0; }; + void test(const B &x) { + B y = x; + y = x; + } +} |