From: Douglas Gregor Date: Wed, 10 Aug 2011 16:59:20 +0000 (+0000) Subject: Expand test of C++0x [class.copymove]p15 to make sure we're actually calling the... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=036e81c79805364d984af2be06be62562e08c980;p=clang 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137220 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CXX/special/class.copy/p15-0x.cpp b/test/CXX/special/class.copy/p15-0x.cpp index 42c83d5b4e..91cea03f58 100644 --- a/test/CXX/special/class.copy/p15-0x.cpp +++ b/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); + } }