diff options
Diffstat (limited to 'lib/Analysis/ArrayBoundChecker.cpp')
-rw-r--r-- | lib/Analysis/ArrayBoundChecker.cpp | 5 |
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); |