diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.noop/noop_coroutine.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.noop/noop_coroutine.pass.cpp index 4ff9414dfdf4..9682e808b08e 100644 --- a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.noop/noop_coroutine.pass.cpp +++ b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.noop/noop_coroutine.pass.cpp @@ -10,6 +10,8 @@ // UNSUPPORTED: c++98, c++03, c++11 // XFAIL: clang-5, clang-6 +// UNSUPPORTED: ubsan + // // struct noop_coroutine_promise; // using noop_coroutine_handle = coroutine_handle; @@ -19,8 +21,11 @@ #include #include +#if __has_builtin(__builtin_coro_noop) + namespace coro = std::experimental::coroutines_v1; + static_assert(std::is_same, coro::noop_coroutine_handle>::value, ""); static_assert(std::is_same::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)