[cfe-commits] r106183 - /cfe/trunk/lib/Checker/RegionStore.cpp
Ted Kremenek
kremenek at apple.com
Wed Jun 16 17:24:42 PDT 2010
Author: kremenek
Date: Wed Jun 16 19:24:42 2010
New Revision: 106183
URL: http://llvm.org/viewvc/llvm-project?rev=106183&view=rev
Log:
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.
Modified:
cfe/trunk/lib/Checker/RegionStore.cpp
Modified: cfe/trunk/lib/Checker/RegionStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/RegionStore.cpp?rev=106183&r1=106182&r2=106183&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/RegionStore.cpp (original)
+++ cfe/trunk/lib/Checker/RegionStore.cpp Wed Jun 16 19:24:42 2010
@@ -399,12 +399,17 @@
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.
More information about the cfe-commits
mailing list