LegalizeAdulthood 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) {
----------------
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 :).


http://reviews.llvm.org/D16259



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to