summaryrefslogtreecommitdiffstats
path: root/clang/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
commit76bccf6221a85b95b627b07b147e34db08508897 (patch)
tree0f13b7709dd3897605e1dcedb3e3dcf79b47fa6c /clang/lib/Analysis/GRExprEngine.cpp
parent553b4b912b6b5c0c9d9f4bdc41a5f1922d58013b (diff)
downloadbcm5719-llvm-76bccf6221a85b95b627b07b147e34db08508897.tar.gz
bcm5719-llvm-76bccf6221a85b95b627b07b147e34db08508897.zip
Within the transfer function of UnaryOperatorExpr, handle implicit promotions
from the subexpression type to the expression type. llvm-svn: 56831
Diffstat (limited to 'clang/lib/Analysis/GRExprEngine.cpp')
-rw-r--r--clang/lib/Analysis/GRExprEngine.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Analysis/GRExprEngine.cpp b/clang/lib/Analysis/GRExprEngine.cpp
index f39b5950616..a4ba1965bb8 100644
--- a/clang/lib/Analysis/GRExprEngine.cpp
+++ b/clang/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));
OpenPOWER on IntegriCloud