diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-10-27 21:54:31 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-10-27 21:54:31 +0000 |
commit | 4f09027385466f1f4c382c80ca77157e2aef97d9 (patch) | |
tree | d27a15491869214b0619dda1cbcbf277e2e13135 /lib/Analysis/BasicStore.cpp | |
parent | 664a2187c7ac47e95ab2c72d4ba7e805e966b430 (diff) |
Added preliminary support for CompoundLiterals in the static analyzer:
- GRExprEngine::VisitCompoundLiteral...
(1) visits the initializer list (generating ExplodedNodes)
(2) creates a CompoundMemRegion for the literal
(3) creates a new state with the bound literal values using
GRStateManager::BindCompoundLiteral
- GRStateManager::BindCompoundLiteral simply calls
StoreManager::BindCompoundLiteral to get a new store and returns a persistent
GRState with that store.
- BasicStore::BindCompoundLiteral simply returns the same store, as it
doesn't handle field sensitivity
- RegionStore::BindCompoundLiteral currently fires an assert (pending discussion
of how to best implement mappings for CompoundLiteralRegion).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58277 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/BasicStore.cpp')
-rw-r--r-- | lib/Analysis/BasicStore.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Analysis/BasicStore.cpp b/lib/Analysis/BasicStore.cpp index 8895954502..05c8523d2d 100644 --- a/lib/Analysis/BasicStore.cpp +++ b/lib/Analysis/BasicStore.cpp @@ -46,6 +46,11 @@ public: return loc::MemRegionVal(MRMgr.getVarRegion(VD)); } + Store BindCompoundLiteral(Store store, const CompoundLiteralRegion* R, + const SVal* BegInit, const SVal* EndInit) { + return store; + } + SVal getLValueVar(const GRState* St, const VarDecl* VD); SVal getLValueString(const GRState* St, const StringLiteral* S); SVal getLValueIvar(const GRState* St, const ObjCIvarDecl* D, SVal Base); |