diff options
author | Tom Care <tcare@apple.com> | 2010-06-25 18:22:31 +0000 |
---|---|---|
committer | Tom Care <tcare@apple.com> | 2010-06-25 18:22:31 +0000 |
commit | 7b050306b0ba3e7e564126fb12aca64b4c0b3f54 (patch) | |
tree | b33ce1f7e21e9f9159f44cbefb9fcdbf539c006c /lib/Checker/RegionStore.cpp | |
parent | bc817cffbca01c879f13e9290d94797f6caafc7a (diff) |
Change RegionStoreManager::Retrieve to infer the type of a symbolic region from the context when it is not already available.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106868 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Checker/RegionStore.cpp')
-rw-r--r-- | lib/Checker/RegionStore.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Checker/RegionStore.cpp b/lib/Checker/RegionStore.cpp index a9d12dfb4a..f7a0188a53 100644 --- a/lib/Checker/RegionStore.cpp +++ b/lib/Checker/RegionStore.cpp @@ -1022,8 +1022,13 @@ SVal RegionStoreManager::Retrieve(Store store, Loc L, QualType T) { const MemRegion *MR = cast<loc::MemRegionVal>(L).getRegion(); - if (isa<AllocaRegion>(MR) || isa<SymbolicRegion>(MR)) + if (isa<AllocaRegion>(MR) || isa<SymbolicRegion>(MR)) { + if (T.isNull()) { + const SymbolicRegion *SR = cast<SymbolicRegion>(MR); + T = SR->getSymbol()->getType(getContext()); + } MR = GetElementZeroRegion(MR, T); + } if (isa<CodeTextRegion>(MR)) { assert(0 && "Why load from a code text region?"); |