forked from OSchip/llvm-project
Bug fix: For transfer function for unary "!", compare the subexpression value
against '0' of the same bit-width. llvm-svn: 47465
This commit is contained in:
parent
20c91421fe
commit
51017b5432
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue