aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/ArrayBoundChecker.cpp
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2009-11-12 02:48:32 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2009-11-12 02:48:32 +0000
commite884ff88baa1bd61db273baf107862a2110058ed (patch)
treed0bde46a6ec417d39c913f8327c59654c03f5193 /lib/Analysis/ArrayBoundChecker.cpp
parenta29e6b87bd53c883cb8ee62178879136a32e270e (diff)
Make StoreManager::getSizeInElements() always return DefinedOrUnknownSVal.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86932 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ArrayBoundChecker.cpp')
-rw-r--r--lib/Analysis/ArrayBoundChecker.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Analysis/ArrayBoundChecker.cpp b/lib/Analysis/ArrayBoundChecker.cpp
index ae8e1149c5..34a5631edd 100644
--- a/lib/Analysis/ArrayBoundChecker.cpp
+++ b/lib/Analysis/ArrayBoundChecker.cpp
@@ -56,9 +56,8 @@ void ArrayBoundChecker::VisitLocation(CheckerContext &C, const Stmt *S, SVal l){
const GRState *state = C.getState();
// Get the size of the array.
- SVal NumVal = C.getStoreManager().getSizeInElements(state,
- ER->getSuperRegion());
- DefinedOrUnknownSVal &NumElements = cast<DefinedOrUnknownSVal>(NumVal);
+ DefinedOrUnknownSVal NumElements
+ = C.getStoreManager().getSizeInElements(state, ER->getSuperRegion());
const GRState *StInBound = state->AssumeInBound(Idx, NumElements, true);
const GRState *StOutBound = state->AssumeInBound(Idx, NumElements, false);