Commit c339c77a authored by Lewis Baker's avatar Lewis Baker Committed by Facebook Github Bot

Revert workarounds for Clang coroutines bugs in tests

Summary:
The CoroTest.cpp file had some tests that were failing under Clang optimised builds due to a compiler bug.

This rolls back those work arounds to re-expose the bug as a way of validating that the bug has been fixed.

Reviewed By: tks2103

Differential Revision: D13383774

fbshipit-source-id: ac219c6ed0a0c8c3b8c3c06e3d01e5ed4ade81bc
parent efe97b16
......@@ -165,12 +165,6 @@ TEST(Coro, LargeStack) {
EXPECT_EQ(5000, coro::blockingWait(std::move(task)));
}
#if defined(__clang__)
#define FOLLY_CORO_DONT_OPTIMISE_ON_CLANG __attribute__((optnone))
#else
#define FOLLY_CORO_DONT_OPTIMISE_ON_CLANG
#endif
coro::Task<void> taskThreadNested(std::thread::id threadId) {
EXPECT_EQ(threadId, std::this_thread::get_id());
(void)co_await futures::sleep(std::chrono::seconds{1});
......@@ -178,7 +172,7 @@ coro::Task<void> taskThreadNested(std::thread::id threadId) {
co_return;
}
coro::Task<int> taskThread() FOLLY_CORO_DONT_OPTIMISE_ON_CLANG {
coro::Task<int> taskThread() {
auto threadId = std::this_thread::get_id();
// BUG: Under @mode/clang-opt builds this object is placed on the coroutine
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment