diff options
author | Anna Zaks <ganna@apple.com> | 2013-12-06 18:56:29 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2013-12-06 18:56:29 +0000 |
commit | cf8d2165ffebd254927463af7d86f61d8bbd3fd2 (patch) | |
tree | cd59cde242b50c800597e0d404729d22141ed601 /clang/lib/Analysis/LiveVariables.cpp | |
parent | ba0aea16e1902cf39d32e2617b88582519e31a28 (diff) | |
download | llvm-cf8d2165ffebd254927463af7d86f61d8bbd3fd2.zip llvm-cf8d2165ffebd254927463af7d86f61d8bbd3fd2.tar.gz llvm-cf8d2165ffebd254927463af7d86f61d8bbd3fd2.tar.bz2 |
Revert "[analyzer] Refactor conditional expression evaluating code"
This reverts commit r189090.
The original patch introduced regressions (see the added live-variables.* tests). The patch depends on the correctness of live variable analyses, which are not computed correctly. I've opened PR18159 to track the proper resolution to this problem.
The patch was a stepping block to r189746. This is why part of the patch reverts temporary destructor tests that started crashing. The temporary destructors feature is disabled by default.
llvm-svn: 196593
Diffstat (limited to 'clang/lib/Analysis/LiveVariables.cpp')
-rw-r--r-- | clang/lib/Analysis/LiveVariables.cpp | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/clang/lib/Analysis/LiveVariables.cpp b/clang/lib/Analysis/LiveVariables.cpp index 38db72a..9e5ec557 100644 --- a/clang/lib/Analysis/LiveVariables.cpp +++ b/clang/lib/Analysis/LiveVariables.cpp @@ -211,8 +211,6 @@ class TransferFunctions : public StmtVisitor<TransferFunctions> { LiveVariables::LivenessValues &val; LiveVariables::Observer *observer; const CFGBlock *currentBlock; - - void markLogicalExprLeaves(const Expr *E); public: TransferFunctions(LiveVariablesImpl &im, LiveVariables::LivenessValues &Val, @@ -369,23 +367,7 @@ void TransferFunctions::VisitBinaryOperator(BinaryOperator *B) { if (observer) observer->observerKill(DR); } - } else if (B->isLogicalOp()) { - // Leaf expressions in the logical operator tree are live until we reach the - // outermost logical operator. Static analyzer relies on this behaviour. - markLogicalExprLeaves(B->getLHS()->IgnoreParens()); - markLogicalExprLeaves(B->getRHS()->IgnoreParens()); - } -} - -void TransferFunctions::markLogicalExprLeaves(const Expr *E) { - const BinaryOperator *B = dyn_cast<BinaryOperator>(E); - if (!B || !B->isLogicalOp()) { - val.liveStmts = LV.SSetFact.add(val.liveStmts, E); - return; } - - markLogicalExprLeaves(B->getLHS()->IgnoreParens()); - markLogicalExprLeaves(B->getRHS()->IgnoreParens()); } void TransferFunctions::VisitBlockExpr(BlockExpr *BE) { |