diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-05-20 09:18:48 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-05-20 09:18:48 +0000 |
commit | 918441255162c1a1c77c13752aaa1a3c43ac2ab9 (patch) | |
tree | f1274af71224d46b41689afc680f587b75309840 /lib/Analysis/RegionStore.cpp | |
parent | 2acc3992b61e71d30653bf19be2479a78e4cd7a1 (diff) |
Treat AllocaRegion as SymbolicRegion in RegionStore::Retrieve().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72166 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/RegionStore.cpp')
-rw-r--r-- | lib/Analysis/RegionStore.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Analysis/RegionStore.cpp b/lib/Analysis/RegionStore.cpp index be34bd57b8..02d3d1f885 100644 --- a/lib/Analysis/RegionStore.cpp +++ b/lib/Analysis/RegionStore.cpp @@ -705,10 +705,13 @@ SVal RegionStoreManager::Retrieve(const GRState* St, Loc L, QualType T) { const MemRegion* MR = cast<loc::MemRegionVal>(L).getRegion(); - // We return unknown for symbolic region for now. This might be improved. + // FIXME: return symbolic value for these cases. // Example: // void f(int* p) { int x = *p; } - if (isa<SymbolicRegion>(MR)) + // char* p = alloca(); + // read(p); + // c = *p; + if (isa<SymbolicRegion>(MR) || isa<AllocaRegion>(MR)) return UnknownVal(); // FIXME: Perhaps this method should just take a 'const MemRegion*' argument |