From: Ted Kremenek Date: Tue, 13 Jan 2009 01:03:27 +0000 (+0000) Subject: Invert condition on branch (was causing RegionStore::ArrayToPointer to return 'unknow... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bbee1a790f77b42a0bcd79bdd3d367e46042db67;p=clang Invert condition on branch (was causing RegionStore::ArrayToPointer to return 'unknown' on most cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62129 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/RegionStore.cpp b/lib/Analysis/RegionStore.cpp index 598107c1ea..9041930a84 100644 --- a/lib/Analysis/RegionStore.cpp +++ b/lib/Analysis/RegionStore.cpp @@ -452,7 +452,7 @@ SVal RegionStoreManager::ArrayToPointer(SVal Array) { const MemRegion* R = cast(&Array)->getRegion(); const TypedRegion* ArrayR = dyn_cast(R); - if (ArrayR) + if (!ArrayR) return UnknownVal(); nonloc::ConcreteInt Idx(getBasicVals().getZeroWithPtrWidth(false));