[clang] [Clang] Warn about `[[noreturn]]` on coroutines (PR #127623)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 18 09:02:05 PST 2025
https://github.com/Sirraide requested changes to this pull request.
Yeah, I agree we should be warning on this.
However, AnalysisBasedWarnings isn’t really the right place for this, because that’s all about emitting warnings based on control-flow analysis, but whether a function is a coroutine or declared noreturn is known even without control-flow analysis, so this should probably go somewhere else (additionally, the analysis-based warnings pass doesn’t run if there are *any* errors anywhere else in the TU—another reason why handling this elsewhere would be preferrable). Probably where we create the FunctionDecl?
https://github.com/llvm/llvm-project/pull/127623
More information about the cfe-commits
mailing list