kimgr added inline comments. ================ Comment at: test/clang-tidy/readability-redundant-return.cpp:21-24 @@ +20,6 @@ + +void g(int i) { + if (i < 0) { + return; + } + if (i < 10) { ---------------- LegalizeAdulthood wrote: > kimgr wrote: > > What happens to guard clauses invoking void functions? > > > > void h() { > > } > > > > void g(int i) { > > if(i < 0) { > > return h(); > > } > > } > > > Nothing because the last statement of the `compoundStmt` that is the function > body is an `if` statement and not a `return` statement. > > That is exactly why lines 21-24 are in the test suite :). Ah, I hadn't understood the mechanics of the check. I read the docs, and now I do! Don't mind me :-)
http://reviews.llvm.org/D16259 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits