aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/GRExprEngine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Analysis/GRExprEngine.cpp')
-rw-r--r--lib/Analysis/GRExprEngine.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp
index 72bae32231..53567c184e 100644
--- a/lib/Analysis/GRExprEngine.cpp
+++ b/lib/Analysis/GRExprEngine.cpp
@@ -709,20 +709,23 @@ void GRExprEngine::VisitDeclRefExpr(DeclRefExpr* D, NodeTy* Pred, NodeSet& Dst){
}
void GRExprEngine::VisitStore(NodeSet& Dst, Expr* E, NodeTy* Pred,
- ValueState* St, LVal TargetLV, RVal Val) {
+ ValueState* St, RVal TargetLV, RVal Val) {
assert (Builder && "GRStmtNodeBuilder must be defined.");
unsigned size = Dst.size();
SaveAndRestore<bool> OldSink(Builder->BuildSinks);
+ assert (!TargetLV.isUndef());
+
EvalStore(Dst, E, Pred, St, TargetLV, Val);
// Handle the case where no nodes where generated. Auto-generate that
// contains the updated state if we aren't generating sinks.
if (!Builder->BuildSinks && Dst.size() == size)
- MakeNode(Dst, E, Pred, SetRVal(St, TargetLV, Val));
+ TF->GRTransferFuncs::EvalStore(Dst, *this, *Builder, E, Pred, St,
+ TargetLV, Val);
}
//===----------------------------------------------------------------------===//
@@ -1643,21 +1646,12 @@ void GRExprEngine::VisitBinaryOperator(BinaryOperator* B,
: cast<RVal>(nonlval::SymbolVal(Sym));
}
- // Even if the LHS evaluates to an unknown L-Value, the entire
- // expression still evaluates to the RHS.
-
- if (LeftV.isUnknown()) {
- St = SetRVal(St, B, RightV);
- break;
- }
-
// Simulate the effects of a "store": bind the value of the RHS
// to the L-Value represented by the LHS.
VisitStore(Dst, B, N2, SetRVal(St, B, RightV),
- cast<LVal>(LeftV), RightV);
+ LeftV, RightV);
-// St = SetRVal(SetRVal(St, B, RightV), cast<LVal>(LeftV), RightV);
continue;
}