[PATCH] D16259: Add clang-tidy readability-redundant-return check
Kim Gräsman via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 19 11:09:38 PST 2016
kimgr added a subscriber: kimgr.
kimgr added a comment.
Came up with another test case.
================
Comment at: test/clang-tidy/readability-redundant-return.cpp:21-24
@@ +20,6 @@
+
+void g(int i) {
+ if (i < 0) {
+ return;
+ }
+ if (i < 10) {
----------------
What happens to guard clauses invoking void functions?
void h() {
}
void g(int i) {
if(i < 0) {
return h();
}
}
http://reviews.llvm.org/D16259
More information about the cfe-commits
mailing list