forked from OSchip/llvm-project
Correct XFAIL's in coroutine tests to only list ubsan
llvm-svn: 304106
This commit is contained in:
parent
15ee787ac2
commit
09fcc2ce9b
|
@ -11,9 +11,8 @@
|
||||||
// UNSUPPORTED: c++98, c++03, c++11
|
// UNSUPPORTED: c++98, c++03, c++11
|
||||||
// REQUIRES: fcoroutines-ts
|
// REQUIRES: fcoroutines-ts
|
||||||
|
|
||||||
// These configurations run the tests with '-g', which hits a bug in Clangs
|
// FIXME: When run under UBSAN this test hits an assertion inside Clang
|
||||||
// coroutine implementation.
|
// XFAIL: ubsan
|
||||||
// XFAIL: asan, msan, ubsan, tsan
|
|
||||||
|
|
||||||
// RUN: %build -fcoroutines-ts
|
// RUN: %build -fcoroutines-ts
|
||||||
// RUN: %run
|
// RUN: %run
|
||||||
|
@ -26,14 +25,15 @@ using namespace std::experimental;
|
||||||
struct coro_t {
|
struct coro_t {
|
||||||
struct promise_type {
|
struct promise_type {
|
||||||
coro_t get_return_object() {
|
coro_t get_return_object() {
|
||||||
coroutine_handle<promise_type>{};
|
return coroutine_handle<promise_type>::from_promise(*this);
|
||||||
return {};
|
|
||||||
}
|
}
|
||||||
suspend_never initial_suspend() { return {}; }
|
suspend_never initial_suspend() { return {}; }
|
||||||
suspend_never final_suspend() { return {}; }
|
suspend_never final_suspend() { return {}; }
|
||||||
void return_void(){}
|
void return_void(){}
|
||||||
void unhandled_exception() {}
|
void unhandled_exception() {}
|
||||||
};
|
};
|
||||||
|
coro_t(coroutine_handle<promise_type> hh) : h(hh) {}
|
||||||
|
coroutine_handle<promise_type> h;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct NoSuspend {
|
struct NoSuspend {
|
||||||
|
@ -64,7 +64,9 @@ coro_t g() {
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
assert(!f_started && !f_resumed && !g_started && !g_resumed);
|
assert(!f_started && !f_resumed && !g_started && !g_resumed);
|
||||||
f();
|
auto fret = f();
|
||||||
|
assert(f_started && !f_resumed);
|
||||||
|
fret.h.destroy();
|
||||||
assert(f_started && !f_resumed);
|
assert(f_started && !f_resumed);
|
||||||
g();
|
g();
|
||||||
assert(g_started && g_resumed);
|
assert(g_started && g_resumed);
|
||||||
|
|
|
@ -11,9 +11,8 @@
|
||||||
// UNSUPPORTED: c++98, c++03, c++11
|
// UNSUPPORTED: c++98, c++03, c++11
|
||||||
// REQUIRES: fcoroutines-ts
|
// REQUIRES: fcoroutines-ts
|
||||||
|
|
||||||
// These configurations run the tests with '-g', which hits a bug in Clangs
|
// FIXME: When run under UBSAN this test hits an assertion inside Clang
|
||||||
// coroutine implementation.
|
// XFAIL: ubsan
|
||||||
// XFAIL: asan, msan, ubsan, tsan
|
|
||||||
|
|
||||||
// RUN: %build -fcoroutines-ts
|
// RUN: %build -fcoroutines-ts
|
||||||
// RUN: %run
|
// RUN: %run
|
||||||
|
|
Loading…
Reference in New Issue