aboutsummaryrefslogtreecommitdiff
path: root/clang/test/CodeGenCXX/implicit-copy-constructor.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-06-17 00:18:42 +0000
committerJohn McCall <rjmccall@apple.com>2011-06-17 00:18:42 +0000
commit1b1a1dbbe7526f2f336a1341c2e90da25d40fa80 (patch)
tree0fb4996158dfaebcf3a6320847afd6c038f02132 /clang/test/CodeGenCXX/implicit-copy-constructor.cpp
parent66773c33983b3fe2df9e4eeae1e2cc678197d470 (diff)
downloadllvm-1b1a1dbbe7526f2f336a1341c2e90da25d40fa80.zip
llvm-1b1a1dbbe7526f2f336a1341c2e90da25d40fa80.tar.gz
llvm-1b1a1dbbe7526f2f336a1341c2e90da25d40fa80.tar.bz2
When synthesizing implicit copy/move constructors and copy/move assignment
operators, don't make an initializer or sub-operation for zero-width bitfields. llvm-svn: 133221
Diffstat (limited to 'clang/test/CodeGenCXX/implicit-copy-constructor.cpp')
-rw-r--r--clang/test/CodeGenCXX/implicit-copy-constructor.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/implicit-copy-constructor.cpp b/clang/test/CodeGenCXX/implicit-copy-constructor.cpp
index 5008601..8bc84a5 100644
--- a/clang/test/CodeGenCXX/implicit-copy-constructor.cpp
+++ b/clang/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;
+ }
+}