aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/RegionStore.cpp
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2008-11-15 05:18:50 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2008-11-15 05:18:50 +0000
commita09300a9db77743f6c8f13da51e332a07bb31145 (patch)
treeab4d70409e050e7f0dfb5f84814c159f8863e520 /lib/Analysis/RegionStore.cpp
parent8bb87e8de5fc8e4c91e78468b65a66b5b2b82d71 (diff)
Improve zero value generation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59356 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/RegionStore.cpp')
-rw-r--r--lib/Analysis/RegionStore.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Analysis/RegionStore.cpp b/lib/Analysis/RegionStore.cpp
index b09c49ec09..f1c57b33bd 100644
--- a/lib/Analysis/RegionStore.cpp
+++ b/lib/Analysis/RegionStore.cpp
@@ -232,8 +232,7 @@ SVal RegionStoreManager::ArrayToPointer(SVal Array) {
const MemRegion* ArrayR = cast<loc::MemRegionVal>(&Array)->getRegion();
BasicValueFactory& BasicVals = StateMgr.getBasicVals();
- // FIXME: Find a better way to get bit width.
- nonloc::ConcreteInt Idx(BasicVals.getValue(0, 32, false));
+ nonloc::ConcreteInt Idx(BasicVals.getZeroWithPtrWidth(false));
ElementRegion* ER = MRMgr.getElementRegion(Idx, ArrayR);
return loc::MemRegionVal(ER);