[PATCH] D96082: [clang-tidy] Add 'readability-useless-return-value' check
Lukas Hänel via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 5 05:10:40 PST 2021
LukasHanel marked 9 inline comments as done.
LukasHanel added a comment.
Thanks for the review!
================
Comment at: clang-tools-extra/docs/clang-tidy/checks/readability-useless-return-value.rst:43
+ int ret = 0;
+ return;
+ }
----------------
Eugene.Zelenko wrote:
> Return is redundant. See readability-redundant-control-flow.
My new checker will not remove the return statement. I added a new comment to the readme to recommend usage of the other checker as well.
Should I extend the fix-it to remove also the `return` statement?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96082/new/
https://reviews.llvm.org/D96082
More information about the cfe-commits
mailing list