Make dead return statement detection more robust against changes in the CFG.
authorManuel Klimek <klimek@google.com>
Fri, 23 May 2014 17:09:56 +0000 (17:09 +0000)
committerManuel Klimek <klimek@google.com>
Fri, 23 May 2014 17:09:56 +0000 (17:09 +0000)
commit5fbdc93d9751317f493dd988f9f01ce98bf00222
tree22beac0024f9dd5ccd9ecc137ea4228cc2ca0d69
parenta33815be22055f1c1e7b27ce5ffea12292f942f8
Make dead return statement detection more robust against changes in the CFG.

This change is a precondition to the proposed change to handle temporary
dtors correctly.

The idea is to explicitly search for the next return that doesn't have other
paths into it (that is, if the current block is dead, the block containing the
return must be dead, too). Thus, introducing non-control-flow block
transitions will not break the logic.

llvm-svn: 209531
clang/lib/Analysis/ReachableCode.cpp