aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/SValuator.cpp
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2010-01-14 03:45:06 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2010-01-14 03:45:06 +0000
commit7b81e8fe6f8576340af7899c1828f1af0781d775 (patch)
tree49cbf37c537d7798d0aae48b0d50212193ee732e /lib/Analysis/SValuator.cpp
parentdef9107059d460ada5f0eb3d58189c59122e3c3f (diff)
Fix pr6035.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93422 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/SValuator.cpp')
-rw-r--r--lib/Analysis/SValuator.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Analysis/SValuator.cpp b/lib/Analysis/SValuator.cpp
index 0e56026bb4..8392fcf65a 100644
--- a/lib/Analysis/SValuator.cpp
+++ b/lib/Analysis/SValuator.cpp
@@ -66,6 +66,9 @@ SValuator::CastResult SValuator::EvalCast(SVal val, const GRState *state,
if (C.hasSameUnqualifiedType(castTy, originalTy))
return CastResult(state, val);
+ if (castTy->isIntegerType() && originalTy->isIntegerType())
+ return CastResult(state, EvalCastNL(cast<NonLoc>(val), castTy));
+
// Check for casts from pointers to integers.
if (castTy->isIntegerType() && Loc::IsLocType(originalTy))
return CastResult(state, EvalCastL(cast<Loc>(val), castTy));