/// \brief Run checkers for pre-visiting Stmts.
void runCheckersForPreStmt(ExplodedNodeSet &Dst,
- ExplodedNodeSet &Src,
+ const ExplodedNodeSet &Src,
const Stmt *S,
ExprEngine &Eng) {
runCheckersForStmt(/*isPreVisit=*/true, Dst, Src, S, Eng);
/// \brief Run checkers for post-visiting Stmts.
void runCheckersForPostStmt(ExplodedNodeSet &Dst,
- ExplodedNodeSet &Src,
+ const ExplodedNodeSet &Src,
const Stmt *S,
ExprEngine &Eng) {
runCheckersForStmt(/*isPreVisit=*/false, Dst, Src, S, Eng);
/// \brief Run checkers for visiting Stmts.
void runCheckersForStmt(bool isPreVisit,
- ExplodedNodeSet &Dst, ExplodedNodeSet &Src,
+ ExplodedNodeSet &Dst, const ExplodedNodeSet &Src,
const Stmt *S, ExprEngine &Eng);
/// \brief Run checkers for pre-visiting obj-c messages.
void runCheckersForPreObjCMessage(ExplodedNodeSet &Dst,
- ExplodedNodeSet &Src,
+ const ExplodedNodeSet &Src,
const ObjCMessage &msg,
ExprEngine &Eng) {
runCheckersForObjCMessage(/*isPreVisit=*/true, Dst, Src, msg, Eng);
/// \brief Run checkers for post-visiting obj-c messages.
void runCheckersForPostObjCMessage(ExplodedNodeSet &Dst,
- ExplodedNodeSet &Src,
+ const ExplodedNodeSet &Src,
const ObjCMessage &msg,
ExprEngine &Eng) {
runCheckersForObjCMessage(/*isPreVisit=*/false, Dst, Src, msg, Eng);
/// \brief Run checkers for visiting obj-c messages.
void runCheckersForObjCMessage(bool isPreVisit,
- ExplodedNodeSet &Dst, ExplodedNodeSet &Src,
+ ExplodedNodeSet &Dst,
+ const ExplodedNodeSet &Src,
const ObjCMessage &msg, ExprEngine &Eng);
/// \brief Run checkers for load/store of a location.
void runCheckersForLocation(ExplodedNodeSet &Dst,
- ExplodedNodeSet &Src,
+ const ExplodedNodeSet &Src,
SVal location, bool isLoad,
const Stmt *S,
const GRState *state,
template <typename CHECK_CTX>
static void expandGraphWithCheckers(CHECK_CTX checkCtx,
ExplodedNodeSet &Dst,
- ExplodedNodeSet &Src) {
+ const ExplodedNodeSet &Src) {
typename CHECK_CTX::CheckersTy::const_iterator
I = checkCtx.checkers_begin(), E = checkCtx.checkers_end();
return;
}
- ExplodedNodeSet Tmp;
- ExplodedNodeSet *PrevSet = &Src;
+ ExplodedNodeSet Tmp1, Tmp2;
+ const ExplodedNodeSet *PrevSet = &Src;
for (; I != E; ++I) {
ExplodedNodeSet *CurrSet = 0;
if (I+1 == E)
CurrSet = &Dst;
else {
- CurrSet = (PrevSet == &Tmp) ? &Src : &Tmp;
+ CurrSet = (PrevSet == &Tmp1) ? &Tmp2 : &Tmp1;
CurrSet->clear();
}
/// \brief Run checkers for visiting Stmts.
void CheckerManager::runCheckersForStmt(bool isPreVisit,
ExplodedNodeSet &Dst,
- ExplodedNodeSet &Src,
+ const ExplodedNodeSet &Src,
const Stmt *S,
ExprEngine &Eng) {
CheckStmtContext C(isPreVisit, *getCachedStmtCheckersFor(S, isPreVisit),
/// \brief Run checkers for visiting obj-c messages.
void CheckerManager::runCheckersForObjCMessage(bool isPreVisit,
ExplodedNodeSet &Dst,
- ExplodedNodeSet &Src,
+ const ExplodedNodeSet &Src,
const ObjCMessage &msg,
ExprEngine &Eng) {
CheckObjCMessageContext C(isPreVisit,
/// \brief Run checkers for load/store of a location.
void CheckerManager::runCheckersForLocation(ExplodedNodeSet &Dst,
- ExplodedNodeSet &Src,
+ const ExplodedNodeSet &Src,
SVal location, bool isLoad,
const Stmt *S,
const GRState *state,