diff options
| author | Eric Fiselier <eric@efcs.ca> | 2017-05-28 20:30:18 +0000 |
|---|---|---|
| committer | Eric Fiselier <eric@efcs.ca> | 2017-05-28 20:30:18 +0000 |
| commit | 8f7952c19022b591740451d56c5c3621b450317a (patch) | |
| tree | d0165692fa3049320e8496e4be97d48ac4b13fe2 /libcxx | |
| parent | 4aaf69749baa844336a3660d71dbfb96c7bf9b5c (diff) | |
| download | bcm5719-llvm-8f7952c19022b591740451d56c5c3621b450317a.tar.gz bcm5719-llvm-8f7952c19022b591740451d56c5c3621b450317a.zip | |
Add hack to allow test to run w/o C++17 copy elision
llvm-svn: 304103
Diffstat (limited to 'libcxx')
| -rw-r--r-- | libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/fullexpr-dtor.sh.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/fullexpr-dtor.sh.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/fullexpr-dtor.sh.cpp index 2442029a7e5..c7e34fe919e 100644 --- a/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/fullexpr-dtor.sh.cpp +++ b/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/fullexpr-dtor.sh.cpp @@ -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(); { |

