[clang] [Clang] Warn about `[[noreturn]]` on coroutines (PR #127623)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 18 12:55:07 PST 2025
Sirraide wrote:
> I think the changes are fine now, but we should add one more test case:
>
> ```c++
> // NO warning here. This could be a regular function returning a `Coro` object.
> [[noreturn]] Coro test2();
> ```
>
> Putting the check in `CheckCompletedCoroutineBody()` means that this should already work properly, but let’s add a test just to be sure.
Admittedly, declaring *any* non-void function `noreturn` is semantically questionable imo, but that’s not really relevant for this pr.
https://github.com/llvm/llvm-project/pull/127623
More information about the cfe-commits
mailing list