diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-01-18 08:54:31 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-01-18 08:54:31 +0000 |
commit | 3ed04d37573c566205d965d2e91d54ccae898d0a (patch) | |
tree | 3dceac07a4d604c2957a8b608f0e60926dcc3637 /lib/Analysis/ArrayBoundChecker.cpp | |
parent | 7a2132a5d2fead49f6fddc39137e1c14b70c0193 (diff) |
Add support for computing size in elements for symbolic regions obtained from
malloc().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93722 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ArrayBoundChecker.cpp')
-rw-r--r-- | lib/Analysis/ArrayBoundChecker.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Analysis/ArrayBoundChecker.cpp b/lib/Analysis/ArrayBoundChecker.cpp index 3d95ab1834..49c8606826 100644 --- a/lib/Analysis/ArrayBoundChecker.cpp +++ b/lib/Analysis/ArrayBoundChecker.cpp @@ -57,7 +57,8 @@ void ArrayBoundChecker::VisitLocation(CheckerContext &C, const Stmt *S, SVal l){ // Get the size of the array. DefinedOrUnknownSVal NumElements - = C.getStoreManager().getSizeInElements(state, ER->getSuperRegion()); + = C.getStoreManager().getSizeInElements(state, ER->getSuperRegion(), + ER->getValueType(C.getASTContext())); const GRState *StInBound = state->AssumeInBound(Idx, NumElements, true); const GRState *StOutBound = state->AssumeInBound(Idx, NumElements, false); |