From 855cd903beadc056ea300464b46c6c46b91d290f Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Tue, 30 Sep 2008 05:32:44 +0000 Subject: [PATCH] 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 --- lib/Analysis/GRExprEngine.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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)); -- 2.50.1