Don't use std::auto_ptr with getSubRegionMap().

llvm-svn: 65957
This commit is contained in:
Ted Kremenek 2009-03-03 19:02:42 +00:00
parent e3852bd252
commit 9f276d6279
4 changed files with 9 additions and 9 deletions

View File

@ -81,8 +81,9 @@ public:
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;

View File

@ -47,8 +47,8 @@ public:
~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());

View File

@ -278,7 +278,7 @@ bool ScanReachableSymbols::scan(const MemRegion *R) {
// 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);
}

View File

@ -161,7 +161,7 @@ public:
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);
@ -303,8 +303,7 @@ StoreManager* clang::CreateRegionStoreManager(GRStateManager& StMgr) {
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();
@ -313,7 +312,7 @@ RegionStoreManager::getSubRegionMap(const GRState *state) {
M->add(R->getSuperRegion(), R);
}
return std::auto_ptr<SubRegionMap>(M);
return M;
}
/// getLValueString - Returns an SVal representing the lvalue of a