[libcxx] r304103 - Add hack to allow test to run w/o C++17 copy elision

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Sun May 28 13:30:18 PDT 2017


Author: ericwf
Date: Sun May 28 15:30:18 2017
New Revision: 304103

URL: http://llvm.org/viewvc/llvm-project?rev=304103&view=rev
Log:
Add hack to allow test to run w/o C++17 copy elision

Modified:
    libcxx/trunk/test/std/experimental/language.support/support.coroutines/end.to.end/fullexpr-dtor.sh.cpp

Modified: libcxx/trunk/test/std/experimental/language.support/support.coroutines/end.to.end/fullexpr-dtor.sh.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/language.support/support.coroutines/end.to.end/fullexpr-dtor.sh.cpp?rev=304103&r1=304102&r2=304103&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/language.support/support.coroutines/end.to.end/fullexpr-dtor.sh.cpp (original)
+++ libcxx/trunk/test/std/experimental/language.support/support.coroutines/end.to.end/fullexpr-dtor.sh.cpp Sun May 28 15:30:18 2017
@@ -17,6 +17,8 @@
 #include <experimental/coroutine>
 #include <cassert>
 
+#include "test_macros.h"
+
 using namespace std::experimental;
 
 int alive = 0;
@@ -30,8 +32,14 @@ void reset() {
 }
 struct Noisy {
   Noisy() { ++alive; ++ctor_called; }
-  Noisy(Noisy const&) = delete;
   ~Noisy() { --alive; ++dtor_called; }
+#if TEST_STD_VER > 14
+  Noisy(Noisy const&) = delete;
+#else
+  // FIXME: This test depends on copy elision taking place in C++14
+  // (pre-c++17 guaranteed copy elision)
+  Noisy(Noisy const&);
+#endif
 };
 
 struct Bug {
@@ -52,7 +60,6 @@ struct coro2 {
 
 // Checks that destructors are correctly invoked for the object returned by
 // coawait.
-// CHECK-LABEL: @a(
 coro2 a() {
   reset();
   {




More information about the cfe-commits mailing list