Within the transfer function of UnaryOperatorExpr, handle implicit promotions

from the subexpression type to the expression type.

llvm-svn: 56831
This commit is contained in:
Ted Kremenek 2008-09-30 05:32:44 +00:00
parent 553b4b912b
commit 76bccf6221
1 changed files with 5 additions and 0 deletions

View File

@ -1682,7 +1682,12 @@ void GRExprEngine::VisitUnaryOperator(UnaryOperator* U, NodeTy* Pred,
for (NodeSet::iterator I=Tmp.begin(), E=Tmp.end(); I!=E; ++I) {
const GRState* St = GetState(*I);
// Get the value of the subexpression.
RVal V = GetRVal(St, Ex);
// Perform promotions.
V = EvalCast(V, U->getType());
if (V.isUnknownOrUndef()) {
MakeNode(Dst, U, *I, SetRVal(St, U, V));