From 167f2fa5f49a1d3c73f915b5932f854f81871b9b Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Tue, 13 Jan 2009 01:03:27 +0000 Subject: [PATCH] Invert condition on branch (was causing RegionStore::ArrayToPointer to return 'unknown' on most cases. llvm-svn: 62129 --- clang/lib/Analysis/RegionStore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/Analysis/RegionStore.cpp b/clang/lib/Analysis/RegionStore.cpp index 598107c1ea53..9041930a84c9 100644 --- a/clang/lib/Analysis/RegionStore.cpp +++ b/clang/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));