[cfe-commits] r46319 - /cfe/trunk/Analysis/GRConstants.cpp
Ted Kremenek
kremenek at apple.com
Thu Jan 24 11:28:02 PST 2008
Author: kremenek
Date: Thu Jan 24 13:28:01 2008
New Revision: 46319
URL: http://llvm.org/viewvc/llvm-project?rev=46319&view=rev
Log:
Fixed a bug where the values of block-level expressions were being recorded in
the value map as if the expressions were non-block-level expressions.
Modified:
cfe/trunk/Analysis/GRConstants.cpp
Modified: cfe/trunk/Analysis/GRConstants.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Analysis/GRConstants.cpp?rev=46319&r1=46318&r2=46319&view=diff
==============================================================================
--- cfe/trunk/Analysis/GRConstants.cpp (original)
+++ cfe/trunk/Analysis/GRConstants.cpp Thu Jan 24 13:28:01 2008
@@ -608,8 +608,7 @@
/// mappings removed.
StateTy RemoveDeadBindings(Stmt* S, StateTy M);
- StateTy SetValue(StateTy St, Stmt* S, const ExprValue& V,
- bool isBlkExpr = false);
+ StateTy SetValue(StateTy St, Stmt* S, const ExprValue& V);
StateTy SetValue(StateTy St, const LValue& LV, const ExprValue& V);
@@ -726,13 +725,15 @@
}
GRConstants::StateTy GRConstants::SetValue(StateTy St, Stmt* S,
- const ExprValue& V, bool isBlkExpr) {
+ const ExprValue& V) {
if (!StateCleaned) {
St = RemoveDeadBindings(CurrentStmt, St);
StateCleaned = true;
}
+ bool isBlkExpr = S == CurrentStmt && getCFG().isBlkExpr(S);
+
return V.isValid() ? StateMgr.Add(St, ValueKey(S,isBlkExpr), V)
: St;
}
More information about the cfe-commits
mailing list