diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-02-22 00:42:36 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-02-22 00:42:36 +0000 |
commit | f7ca6968d541d020c3a51430b16c7b090b24befe (patch) | |
tree | bde7951d48c240a7e3c064259ebb54c65b32c853 | |
parent | 5620631a0245255bfcdd00948b8598778526297d (diff) |
Bug fix: For transfer function for unary "!", compare the subexpression value
against '0' of the same bit-width.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47465 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | Analysis/GRExprEngine.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Analysis/GRExprEngine.cpp b/Analysis/GRExprEngine.cpp index 80de395c58..6635b0b6a6 100644 --- a/Analysis/GRExprEngine.cpp +++ b/Analysis/GRExprEngine.cpp @@ -747,7 +747,8 @@ void GRExprEngine::VisitUnaryOperator(UnaryOperator* U, NodeTy* Pred, 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); } |