aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/GRExprEngine.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-09-30 05:32:44 +0000
committerTed Kremenek <kremenek@apple.com>2008-09-30 05:32:44 +0000
commit855cd903beadc056ea300464b46c6c46b91d290f (patch)
treef923704af988ebca95878924a4533bf87414cffa /lib/Analysis/GRExprEngine.cpp
parent7f57b000f232bc596dca627c976ace250c8171e3 (diff)
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
Diffstat (limited to 'lib/Analysis/GRExprEngine.cpp')
-rw-r--r--lib/Analysis/GRExprEngine.cpp5
1 files changed, 5 insertions, 0 deletions
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));