[clang] [compiler-rt] [Clang] Make `-Wreturn-type` default to an error in all language modes (PR #123470)
Sam James via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 27 06:13:57 PST 2025
thesamesam wrote:
> The way -Wreturn-type is implemented in Clang is we build a CFG from the AST and then walk that to determine whether all paths return a value, if that’s what you’re asking.
What I'm asking is: isn't this more susceptible to FPs than other typical Clang warnings, and hence maybe shouldn't be an error? e.g. cases where some assert is made in the only caller so we know it can't happen, or it's a fixed value and that is wrongly not propagated.
https://github.com/llvm/llvm-project/pull/123470
More information about the llvm-commits
mailing list