From: Zhongxing Xu Date: Sat, 15 Nov 2008 05:18:50 +0000 (+0000) Subject: Improve zero value generation. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a09300a9db77743f6c8f13da51e332a07bb31145;p=clang Improve zero value generation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59356 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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(&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);