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 | 51017b5432de9d588af76c02b2a66e3c0e7efdea (patch) | |
| tree | 268e315aa8788b55593c724310da70b211893de4 | |
| parent | 20c91421fed1790934af301849d1407ff94d4e63 (diff) | |
| download | bcm5719-llvm-51017b5432de9d588af76c02b2a66e3c0e7efdea.tar.gz bcm5719-llvm-51017b5432de9d588af76c02b2a66e3c0e7efdea.zip | |
Bug fix: For transfer function for unary "!", compare the subexpression value
against '0' of the same bit-width.
llvm-svn: 47465
| -rw-r--r-- | clang/Analysis/GRExprEngine.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/Analysis/GRExprEngine.cpp b/clang/Analysis/GRExprEngine.cpp index 80de395c585..6635b0b6a60 100644 --- a/clang/Analysis/GRExprEngine.cpp +++ b/clang/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); } |

