[PATCH] D16259: Add clang-tidy readability-redundant-return check

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 19 07:27:00 PST 2016


alexfh added inline comments.

================
Comment at: clang-tidy/readability/RedundantReturnCheck.h:26
@@ +25,3 @@
+/// http://clang.llvm.org/extra/clang-tidy/checks/readability-redundant-return.html
+class RedundantReturnCheck : public ClangTidyCheck {
+public:
----------------
aaron.ballman wrote:
> Since this also handling continue, I think this would be SpuriousFlowControlCheck instead?
Maybe `RedundantControlFlowStatementsCheck`?

================
Comment at: docs/clang-tidy/checks/readability-redundant-return.rst:7
@@ +6,3 @@
+This check looks for procedures (functions returning no value) with `return`
+statements at the end of the function.  Such `return` statements are redundant.
+
----------------
Please add an example for `return` and one more for `continue`.


http://reviews.llvm.org/D16259





More information about the cfe-commits mailing list