summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-06-17 00:24:42 +0000
committerTed Kremenek <kremenek@apple.com>2010-06-17 00:24:42 +0000
commit648ef7a2d7a1ba993a207be4354edd83d0b92c42 (patch)
treec7140d670cc715557ff985df5dc576f6350b3eb3 /clang/lib
parent70c090822db45acac3dd98adff7459bd88078e93 (diff)
downloadbcm5719-llvm-648ef7a2d7a1ba993a207be4354edd83d0b92c42.tar.gz
bcm5719-llvm-648ef7a2d7a1ba993a207be4354edd83d0b92c42.zip
Implement RegionStoreManager::iterBindings(). This implementation only returns the base region in
the binding key instead of the region + offset. It isn't clear if this is the best semantics, but most clients will likely only care about simple bindings, or bindings to a particular variable. We can refine later if necessary. llvm-svn: 106183
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Checker/RegionStore.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/clang/lib/Checker/RegionStore.cpp b/clang/lib/Checker/RegionStore.cpp
index d9ad02a35c4..6f8c2504bd5 100644
--- a/clang/lib/Checker/RegionStore.cpp
+++ b/clang/lib/Checker/RegionStore.cpp
@@ -399,12 +399,17 @@ public: // Part of public interface to class.
const char *sep);
void iterBindings(Store store, BindingsHandler& f) {
- // FIXME: Implement.
- }
-
- // FIXME: Remove.
- BasicValueFactory& getBasicVals() {
- return StateMgr.getBasicVals();
+ RegionBindings B = GetRegionBindings(store);
+ for (RegionBindings::iterator I=B.begin(), E=B.end(); I!=E; ++I) {
+ const BindingKey &K = I.getKey();
+ if (!K.isDirect())
+ continue;
+ if (const SubRegion *R = dyn_cast<SubRegion>(I.getKey().getRegion())) {
+ // FIXME: Possibly incorporate the offset?
+ if (!f.HandleBinding(*this, store, R, I.getData()))
+ return;
+ }
+ }
}
// FIXME: Remove.
OpenPOWER on IntegriCloud