[cfe-commits] r137220 - /cfe/trunk/test/CXX/special/class.copy/p15-0x.cpp

Douglas Gregor dgregor at apple.com
Wed Aug 10 09:59:20 PDT 2011


Author: dgregor
Date: Wed Aug 10 11:59:20 2011
New Revision: 137220

URL: http://llvm.org/viewvc/llvm-project?rev=137220&view=rev
Log:
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

Modified:
    cfe/trunk/test/CXX/special/class.copy/p15-0x.cpp

Modified: cfe/trunk/test/CXX/special/class.copy/p15-0x.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/special/class.copy/p15-0x.cpp?rev=137220&r1=137219&r2=137220&view=diff
==============================================================================
--- cfe/trunk/test/CXX/special/class.copy/p15-0x.cpp (original)
+++ cfe/trunk/test/CXX/special/class.copy/p15-0x.cpp Wed Aug 10 11:59:20 2011
@@ -8,4 +8,11 @@
   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);
+  }
 }





More information about the cfe-commits mailing list