summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/RegionStore.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-10-27 21:54:31 +0000
committerTed Kremenek <kremenek@apple.com>2008-10-27 21:54:31 +0000
commitbf26368255d282aec6f5675152b03b1ff24d9ef7 (patch)
tree9f05a8520529d190e29955576ab769645115ae00 /clang/lib/Analysis/RegionStore.cpp
parent2837b9ef6c1d38e4b49fd32da2abe01b1cece765 (diff)
downloadbcm5719-llvm-bf26368255d282aec6f5675152b03b1ff24d9ef7.tar.gz
bcm5719-llvm-bf26368255d282aec6f5675152b03b1ff24d9ef7.zip
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). llvm-svn: 58277
Diffstat (limited to 'clang/lib/Analysis/RegionStore.cpp')
-rw-r--r--clang/lib/Analysis/RegionStore.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/lib/Analysis/RegionStore.cpp b/clang/lib/Analysis/RegionStore.cpp
index 6a65919b1ee..1c73ceae202 100644
--- a/clang/lib/Analysis/RegionStore.cpp
+++ b/clang/lib/Analysis/RegionStore.cpp
@@ -45,6 +45,15 @@ public:
SVal GetRegionSVal(Store St, const MemRegion* R) {
return Retrieve(St, loc::MemRegionVal(R));
}
+
+ Store BindCompoundLiteral(Store store, const CompoundLiteralRegion* R,
+ const SVal* BegInit, const SVal* EndInit) {
+
+ // FIXME: Let's discuss how we want to do the mapping in RegionStore
+ // from CompoundLiteralRegion to values.
+ assert (false && "Not yet implemented.");
+ return store;
+ }
SVal getLValueString(const GRState* St, const StringLiteral* S);
OpenPOWER on IntegriCloud