diff options
Diffstat (limited to 'Analysis/GRExprEngine.cpp')
-rw-r--r-- | Analysis/GRExprEngine.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Analysis/GRExprEngine.cpp b/Analysis/GRExprEngine.cpp index c0f53fe8c7..1dae433e8f 100644 --- a/Analysis/GRExprEngine.cpp +++ b/Analysis/GRExprEngine.cpp @@ -148,8 +148,8 @@ void GRExprEngine::ProcessBranch(Expr* Condition, Stmt* Term, break; case RVal::UnknownKind: - builder.generateNode(PrevState, true); - builder.generateNode(PrevState, false); + builder.generateNode(MarkBranch(PrevState, Term, true), true); + builder.generateNode(MarkBranch(PrevState, Term, false), false); return; case RVal::UninitializedKind: { @@ -368,6 +368,13 @@ void GRExprEngine::VisitLogicalExpr(BinaryOperator* B, NodeTy* Pred, X = GetBlkExprRVal(St, Ex); + // Handle uninitialized values. + + if (X.isUninit()) { + Nodify(Dst, B, Pred, SetBlkExprRVal(St, B, X)); + return; + } + // We took the RHS. Because the value of the '&&' or '||' expression must // evaluate to 0 or 1, we must assume the value of the RHS evaluates to 0 // or 1. Alternatively, we could take a lazy approach, and calculate this |