From: Ted Kremenek Date: Thu, 16 Jul 2009 00:00:11 +0000 (+0000) Subject: Use utility method to create 0-index into ElementRegion. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=75185b5872a02e1025063dd639236552719ba1d3;p=clang Use utility method to create 0-index into ElementRegion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75865 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/RegionStore.cpp b/lib/Analysis/RegionStore.cpp index fa355f551c..af731c78d2 100644 --- a/lib/Analysis/RegionStore.cpp +++ b/lib/Analysis/RegionStore.cpp @@ -672,8 +672,8 @@ SVal RegionStoreManager::ArrayToPointer(Loc Array) { ArrayType *AT = cast(T); T = AT->getElementType(); - nonloc::ConcreteInt Idx(getBasicVals().getZeroWithPtrWidth(false)); - ElementRegion* ER = MRMgr.getElementRegion(T, Idx, ArrayR, getContext()); + SVal ZeroIdx = ValMgr.makeZeroArrayIndex(); + ElementRegion* ER = MRMgr.getElementRegion(T, ZeroIdx, ArrayR, getContext()); return loc::MemRegionVal(ER); }