summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-08-10 16:59:20 +0000
committerDouglas Gregor <dgregor@apple.com>2011-08-10 16:59:20 +0000
commit9996c8fe018b2063b98ce4dd005304674c9370b4 (patch)
treec75dfb1bc01fe89801136f0d4babf00e3b707839 /clang/test
parent5c076db18ee7d21d1404d00e8c1012a51ab99a75 (diff)
downloadbcm5719-llvm-9996c8fe018b2063b98ce4dd005304674c9370b4.tar.gz
bcm5719-llvm-9996c8fe018b2063b98ce4dd005304674c9370b4.zip
Expand test of C++0x [class.copymove]p15 to make sure we're actually calling the copy constructor of a base/member from an explicitly-defaulted copy constructor, rather than the default constructor
llvm-svn: 137220
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CXX/special/class.copy/p15-0x.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/CXX/special/class.copy/p15-0x.cpp b/clang/test/CXX/special/class.copy/p15-0x.cpp
index 42c83d5b4e5..91cea03f585 100644
--- a/clang/test/CXX/special/class.copy/p15-0x.cpp
+++ b/clang/test/CXX/special/class.copy/p15-0x.cpp
@@ -8,4 +8,11 @@ namespace PR10622 {
void find_or_insert(const foo& __obj) {
foo x(__obj);
}
+
+ struct bar : foo {
+ bar(const bar&) = default;
+ };
+ void test_bar(const bar &obj) {
+ bar obj2(obj);
+ }
}
OpenPOWER on IntegriCloud