From: Ted Kremenek Date: Tue, 30 Sep 2008 05:32:44 +0000 (+0000) Subject: Within the transfer function of UnaryOperatorExpr, handle implicit promotions X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=855cd903beadc056ea300464b46c6c46b91d290f;p=clang Within the transfer function of UnaryOperatorExpr, handle implicit promotions from the subexpression type to the expression type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56831 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp index f39b595061..a4ba1965bb 100644 --- a/lib/Analysis/GRExprEngine.cpp +++ b/lib/Analysis/GRExprEngine.cpp @@ -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));