[clang] [coroutine] Suppress unreachable-code warning on coroutine statements. (PR #77454)
Utkarsh Saxena via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 2 02:52:30 PST 2024
================
@@ -12,6 +12,13 @@ struct task {
std::suspend_always yield_value(int) { return {}; }
task get_return_object();
void unhandled_exception();
+
+ struct Awaiter {
+ bool await_ready();
+ void await_suspend(auto);
+ int await_resume();
+ };
+ auto await_transform(const int& x) { return Awaiter{}; }
----------------
usx95 wrote:
nit: (Just to reduce the boilerplate not related to the test itself) we do not need to define a new awaitable here. Maybe just:
`std::suspend_always await_transform(int) { return {}; }`
https://github.com/llvm/llvm-project/pull/77454
More information about the cfe-commits
mailing list