aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Format/FormatTestJava.cpp
diff options
context:
space:
mode:
authorArnaud A. de Grandmaison <arnaud.degrandmaison@arm.com>2014-11-19 13:32:51 +0000
committerArnaud A. de Grandmaison <arnaud.degrandmaison@arm.com>2014-11-19 13:32:51 +0000
commit7b9dc28060d71b024b6823df6064be2ee8bddef3 (patch)
tree0188c5188cfc0bdf05f82e34366abac27ed371c1 /clang/unittests/Format/FormatTestJava.cpp
parent4d55b4d768a666a9110064c8c09f75de3cbdaba7 (diff)
downloadllvm-7b9dc28060d71b024b6823df6064be2ee8bddef3.zip
llvm-7b9dc28060d71b024b6823df6064be2ee8bddef3.tar.gz
llvm-7b9dc28060d71b024b6823df6064be2ee8bddef3.tar.bz2
Fix tail recursion elimination
When the BasicBlock containing the return instrution has a PHI with 2 incoming values, FoldReturnIntoUncondBranch will remove the no longer used incoming value and remove the no longer needed phi as well. This leaves us with a BB that no longer has a PHI, but the subsequent call to FoldReturnIntoUncondBranch from FoldReturnAndProcessPred will not remove the return instruction (which still uses the result of the call instruction). This prevents EliminateRecursiveTailCall to remove the value, as it is still being used in a basicblock which has no predecessors. The basicblock can not be erased on the spot, because its iterator is still being used in runTRE. This issue was exposed when removing the threshold on size for lifetime marker insertion for named temporaries in clang. The testcase is a much reduced version of peelOffOuterExpr(const Expr*, const ExplodedNode *) from clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp. llvm-svn: 222354
Diffstat (limited to 'clang/unittests/Format/FormatTestJava.cpp')
0 files changed, 0 insertions, 0 deletions