From: Ted Kremenek Date: Sun, 9 Mar 2008 05:15:50 +0000 (+0000) Subject: Fixed crash where SetBlkExpr would attempt to query the liveness data when X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=89413fe2e82c83640cf235c42e14c6e0d3eb3c18;p=clang Fixed crash where SetBlkExpr would attempt to query the liveness data when we weren't processing a statement within a basic block. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48087 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/Analysis/GRExprEngine.cpp b/Analysis/GRExprEngine.cpp index b31f5e539f..95f406b9e0 100644 --- a/Analysis/GRExprEngine.cpp +++ b/Analysis/GRExprEngine.cpp @@ -94,7 +94,7 @@ ValueState* GRExprEngine::SetRVal(ValueState* St, LVal LV, RVal RV) { ValueState* GRExprEngine::SetBlkExprRVal(ValueState* St, Expr* Ex, RVal V) { - if (!StateCleaned) { + if (CurrentStmt && !StateCleaned) { St = RemoveDeadBindings(CurrentStmt, St); StateCleaned = true; }