diff options
| author | Ted Kremenek <kremenek@apple.com> | 2009-03-26 03:35:11 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2009-03-26 03:35:11 +0000 |
| commit | 3e31c26f8195b2fd61b05e58ceb8a2d6ca43a4a4 (patch) | |
| tree | 52b29228621dc93f2d812b701f8ff444e3288c88 /clang/lib/Analysis/RegionStore.cpp | |
| parent | 996749e912985902fa814166b402c193077c9a0e (diff) | |
| download | bcm5719-llvm-3e31c26f8195b2fd61b05e58ceb8a2d6ca43a4a4.tar.gz bcm5719-llvm-3e31c26f8195b2fd61b05e58ceb8a2d6ca43a4a4.zip | |
analyzer infrastructure: make a bunch of changes to symbolic expressions that
Zhongxing and I discussed by email.
Main changes:
- Removed SymIntConstraintVal and SymIntConstraint
- Added SymExpr as a parent class to SymbolData, SymSymExpr, SymIntExpr
- Added nonloc::SymExprVal to wrap SymExpr
- SymbolRef is now just a typedef of 'const SymbolData*'
- Bunch of minor code cleanups in how some methods were invoked (no functionality change)
This changes are part of a long-term plan to have full symbolic expression
trees. This will be useful for lazily evaluating complicated expressions.
llvm-svn: 67731
Diffstat (limited to 'clang/lib/Analysis/RegionStore.cpp')
| -rw-r--r-- | clang/lib/Analysis/RegionStore.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/clang/lib/Analysis/RegionStore.cpp b/clang/lib/Analysis/RegionStore.cpp index 78dda87392d..f23369c8e11 100644 --- a/clang/lib/Analysis/RegionStore.cpp +++ b/clang/lib/Analysis/RegionStore.cpp @@ -367,8 +367,7 @@ SVal RegionStoreManager::getLValueFieldOrIvar(const GRState* St, SVal Base, break; case loc::SymbolValKind: - BaseR = MRMgr.getSymbolicRegion(cast<loc::SymbolVal>(&BaseL)->getSymbol(), - StateMgr.getSymbolManager()); + BaseR = MRMgr.getSymbolicRegion(cast<loc::SymbolVal>(&BaseL)->getSymbol()); break; case loc::GotoLabelKind: @@ -412,11 +411,9 @@ SVal RegionStoreManager::getLValueElement(const GRState* St, const TypedRegion* BaseRegion = 0; - if (isa<loc::SymbolVal>(Base)) - BaseRegion = MRMgr.getSymbolicRegion(cast<loc::SymbolVal>(Base).getSymbol(), - StateMgr.getSymbolManager()); - else - BaseRegion = cast<TypedRegion>(cast<loc::MemRegionVal>(Base).getRegion()); + BaseRegion = isa<loc::SymbolVal>(Base) + ? MRMgr.getSymbolicRegion(cast<loc::SymbolVal>(Base).getSymbol()) + : cast<TypedRegion>(cast<loc::MemRegionVal>(Base).getRegion()); // Pointer of any type can be cast and used as array base. const ElementRegion *ElemR = dyn_cast<ElementRegion>(BaseRegion); @@ -862,8 +859,7 @@ Store RegionStoreManager::Remove(Store store, Loc L) { if (isa<loc::MemRegionVal>(L)) R = cast<loc::MemRegionVal>(L).getRegion(); else if (isa<loc::SymbolVal>(L)) - R = MRMgr.getSymbolicRegion(cast<loc::SymbolVal>(L).getSymbol(), - StateMgr.getSymbolManager()); + R = MRMgr.getSymbolicRegion(cast<loc::SymbolVal>(L).getSymbol()); if (R) { RegionBindingsTy B = GetRegionBindings(store); |

