[PATCH] Make dead return statement detection more robust against changes in the CFG.

Manuel Klimek klimek at google.com
Thu May 22 03:35:08 PDT 2014


================
Comment at: lib/Analysis/ReachableCode.cpp:84
@@ -82,1 +83,3 @@
         }
+        break;
+      }
----------------
Jordan Rose wrote:
> If the block //does// contain a statement, and it's not a return, then we don't want to keep searching, do we?
Why? As long as the statement doesn't add control flow, the next return statement would still be dead, and we'd want to warn on the dead return instead (at least that's how I understood what we're trying to do here :)

http://reviews.llvm.org/D3638






More information about the cfe-commits mailing list