diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-03-03 02:51:43 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-03-03 02:51:43 +0000 |
commit | 5dc2746b6c759d2fdab050d3d41ba60ad141a0a3 (patch) | |
tree | 55eaf1bef07a030e8b5387638becbafb42913d51 /lib/Analysis/RegionStore.cpp | |
parent | ba1bc057852d874930cdc8ab8d09b354ab4486bf (diff) |
Implement FIXME: GRStateManager::scanReachableSymbols now supports scanning MemRegions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65919 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/RegionStore.cpp')
-rw-r--r-- | lib/Analysis/RegionStore.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/Analysis/RegionStore.cpp b/lib/Analysis/RegionStore.cpp index 0671a806d2..6238ff20ed 100644 --- a/lib/Analysis/RegionStore.cpp +++ b/lib/Analysis/RegionStore.cpp @@ -121,18 +121,20 @@ public: ~RegionStoreSubRegionMap() {} - void iterSubRegions(const MemRegion* Parent, Visitor& V) const { + bool iterSubRegions(const MemRegion* Parent, Visitor& V) const { Map::iterator I = M.find(Parent); if (I == M.end()) - return; + return true; llvm::ImmutableSet<const MemRegion*> S = I->second; for (llvm::ImmutableSet<const MemRegion*>::iterator SI=S.begin(),SE=S.end(); SI != SE; ++SI) { if (!V.Visit(Parent, *SI)) - return; + return false; } + + return true; } }; @@ -600,10 +602,8 @@ RegionStoreManager::CastRegion(const GRState* state, const MemRegion* R, SVal RegionStoreManager::EvalBinOp(BinaryOperator::Opcode Op, Loc L, NonLoc R) { // Assume the base location is MemRegionVal(ElementRegion). - - if (!isa<loc::MemRegionVal>(L)) { + if (!isa<loc::MemRegionVal>(L)) return UnknownVal(); - } const MemRegion* MR = cast<loc::MemRegionVal>(L).getRegion(); @@ -621,8 +621,9 @@ SVal RegionStoreManager::EvalBinOp(BinaryOperator::Opcode Op, Loc L, NonLoc R) { ER->getArrayRegion()); return Loc::MakeVal(NewER); - } else - return UnknownVal(); + } + + return UnknownVal(); } SVal RegionStoreManager::Retrieve(const GRState* St, Loc L, QualType T) { |