[cfe-commits] r47465 - /cfe/trunk/Analysis/GRExprEngine.cpp
Ted Kremenek
kremenek at apple.com
Thu Feb 21 16:42:36 PST 2008
Author: kremenek
Date: Thu Feb 21 18:42:36 2008
New Revision: 47465
URL: http://llvm.org/viewvc/llvm-project?rev=47465&view=rev
Log:
Bug fix: For transfer function for unary "!", compare the subexpression value
against '0' of the same bit-width.
Modified:
cfe/trunk/Analysis/GRExprEngine.cpp
Modified: cfe/trunk/Analysis/GRExprEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Analysis/GRExprEngine.cpp?rev=47465&r1=47464&r2=47465&view=diff
==============================================================================
--- cfe/trunk/Analysis/GRExprEngine.cpp (original)
+++ cfe/trunk/Analysis/GRExprEngine.cpp Thu Feb 21 18:42:36 2008
@@ -747,7 +747,8 @@
St = SetRVal(St, U, Result);
}
else {
- nonlval::ConcreteInt V(ValMgr.getZeroWithPtrWidth());
+ Expr* Ex = U->getSubExpr();
+ nonlval::ConcreteInt V(ValMgr.getValue(0, Ex->getType()));
RVal Result = EvalBinOp(BinaryOperator::EQ, cast<NonLVal>(SubV), V);
St = SetRVal(St, U, Result);
}
More information about the cfe-commits
mailing list