================ @@ -33,33 +40,37 @@ task test3() { task test4() { abort(); - 1; // expected-warning {{code will never be executed}} + 1; // expected-warning {{code will never be executed}} co_return; } - task test5() { abort(); - co_await std::suspend_never{}; + co_await 1; } task test6() { abort(); - 1; // expected-warning {{code will never be executed}} - co_await std::suspend_never{}; + 1; // expected-warning {{code will never be executed}} + co_await 3; } task test7() { // coroutine statements are not considered unreachable. - co_await std::suspend_never{}; + co_await 1; abort(); - co_await std::suspend_never{}; + co_await 2; } task test8() { // coroutine statements are not considered unreachable. - // co_await std::suspend_never{}; abort(); co_return; - 1 + 1; // expected-warning {{code will never be executed}} + 1 + 1; // expected-warning {{code will never be executed}} +} + +task test9() { + abort(); + // This warning is emit on the declaration itself, rather the coroutine substmt. ---------------- usx95 wrote:
s/emit/emitted https://github.com/llvm/llvm-project/pull/77454 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits