[clang] Add new flag -Wreturn-mismatch (PR #82872)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 4 11:19:48 PST 2024


https://github.com/AaronBallman commented:

Thank you for the changes! Please be sure to add a release note to `clang/docs/ReleaseNotes.rst` so users know about the new diagnostic flag, and the changes should come with more test coverage. I'd like to see to see a test with `-Wreturn-type -Wno-return-mismatch` and `-Wno-return-type -Wreturn-mismatch` to demonstrate that we properly enable/disable the correct diagnostics. Be sure to test the test cases against GCC trunk as well to see whether we match GCC's behavior or not.

https://github.com/llvm/llvm-project/pull/82872


More information about the cfe-commits mailing list