Add hack to allow test to run w/o C++17 copy elision
authorEric Fiselier <eric@efcs.ca>
Sun, 28 May 2017 20:30:18 +0000 (20:30 +0000)
committerEric Fiselier <eric@efcs.ca>
Sun, 28 May 2017 20:30:18 +0000 (20:30 +0000)
llvm-svn: 304103

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

index 2442029..c7e34fe 100644 (file)
@@ -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();
   {