[coroutines] libcxx noop_coroutine. Make bots happier

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@329240 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Gor Nishanov
2018-04-04 23:43:50 +00:00
parent 827c4ff600
commit ab465be926

View File

@@ -10,6 +10,8 @@
// UNSUPPORTED: c++98, c++03, c++11
// XFAIL: clang-5, clang-6
// UNSUPPORTED: ubsan
// <experimental/coroutine>
// struct noop_coroutine_promise;
// using noop_coroutine_handle = coroutine_handle<noop_coroutine_promise>;
@@ -19,8 +21,11 @@
#include <cassert>
#include <type_traits>
#if __has_builtin(__builtin_coro_noop)
namespace coro = std::experimental::coroutines_v1;
static_assert(std::is_same<coro::coroutine_handle<coro::noop_coroutine_promise>, coro::noop_coroutine_handle>::value, "");
static_assert(std::is_same<decltype(coro::noop_coroutine()), coro::noop_coroutine_handle>::value, "");
@@ -64,3 +69,8 @@ int main()
assert(coro::coroutine_handle<>::from_address(h.address()) == base);
}
#else
int main() {}
#endif // __has_builtin(__builtin_coro_noop)