[PATCH] D25078: [Coroutines] Diagnose when 'main' is declared as a coroutine.
Gor Nishanov via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 30 08:39:56 PDT 2016
GorNishanov added inline comments.
> DiagnosticSemaKinds.td:8569
> "'%0' cannot be used in a varargs function">;
> def ext_coroutine_without_co_await_co_yield : ExtWarn<
> "'co_return' used in a function "
I am wondering, if we can handle all four cases when function can be a coroutine.
co_await
co_yield
co_return
for co_await
future<int> f() { co_return 42; } // is a valid coroutine per P0057R5
https://reviews.llvm.org/D25078
More information about the cfe-commits
mailing list