MemRegionManager& getRegionManager() { return MRMgr; }
/// getSubRegionMap - Returns an opaque map object that clients can query
- /// to get the subregions of a given MemRegion object.
- virtual std::auto_ptr<SubRegionMap> getSubRegionMap(const GRState *state) = 0;
+ /// to get the subregions of a given MemRegion object. It is the
+ // caller's responsibility to 'delete' the returned map.
+ virtual SubRegionMap* getSubRegionMap(const GRState *state) = 0;
virtual SVal getLValueVar(const GRState* St, const VarDecl* VD) = 0;
~BasicStoreManager() {}
- std::auto_ptr<SubRegionMap> getSubRegionMap(const GRState *state) {
- return std::auto_ptr<SubRegionMap>(new BasicStoreSubRegionMap());
+ SubRegionMap* getSubRegionMap(const GRState *state) {
+ return new BasicStoreSubRegionMap();
}
SVal Retrieve(const GRState *state, Loc loc, QualType T = QualType());
// Now look at the subregions.
if (!SRM.get())
- SRM.reset(state.getManager().getStoreManager().getSubRegionMap(state).get());
+ SRM.reset(state.getManager().getStoreManager().getSubRegionMap(state));
return SRM->iterSubRegions(R, *this);
}
MemRegionManager& getRegionManager() { return MRMgr; }
- std::auto_ptr<SubRegionMap> getSubRegionMap(const GRState *state);
+ SubRegionMap* getSubRegionMap(const GRState *state);
const GRState* BindCompoundLiteral(const GRState* St,
const CompoundLiteralExpr* CL, SVal V);
return new RegionStoreManager(StMgr);
}
-std::auto_ptr<SubRegionMap>
-RegionStoreManager::getSubRegionMap(const GRState *state) {
+SubRegionMap* RegionStoreManager::getSubRegionMap(const GRState *state) {
RegionBindingsTy B = GetRegionBindings(state->getStore());
RegionStoreSubRegionMap *M = new RegionStoreSubRegionMap();
M->add(R->getSuperRegion(), R);
}
- return std::auto_ptr<SubRegionMap>(M);
+ return M;
}
/// getLValueString - Returns an SVal representing the lvalue of a