}
assert(checkers);
- for (const auto checker : *checkers)
+ for (const auto &checker : *checkers)
checker(D, mgr, BR);
}
BugReporter &BR) {
assert(D && D->hasBody());
- for (const auto BodyChecker : BodyCheckers)
+ for (const auto &BodyChecker : BodyCheckers)
BodyChecker(D, mgr, BR);
}
void CheckerManager::runCheckersForEndAnalysis(ExplodedGraph &G,
BugReporter &BR,
ExprEngine &Eng) {
- for (const auto EndAnalysisChecker : EndAnalysisCheckers)
+ for (const auto &EndAnalysisChecker : EndAnalysisCheckers)
EndAnalysisChecker(G, BR, Eng);
}
// creates a successor for Pred, we do not need to generate an
// autotransition for it.
NodeBuilder Bldr(Pred, Dst, BC);
- for (const auto checkFn : EndFunctionCheckers) {
+ for (const auto &checkFn : EndFunctionCheckers) {
const ProgramPoint &L =
FunctionExitPoint(RS, Pred->getLocationContext(), checkFn.Checker);
CheckerContext C(Bldr, Eng, Pred, L);
/// Run checkers for live symbols.
void CheckerManager::runCheckersForLiveSymbols(ProgramStateRef state,
SymbolReaper &SymReaper) {
- for (const auto LiveSymbolsChecker : LiveSymbolsCheckers)
+ for (const auto &LiveSymbolsChecker : LiveSymbolsCheckers)
LiveSymbolsChecker(state, SymReaper);
}
ArrayRef<const MemRegion *> Regions,
const LocationContext *LCtx,
const CallEvent *Call) {
- for (const auto RegionChangesChecker : RegionChangesCheckers) {
+ for (const auto &RegionChangesChecker : RegionChangesCheckers) {
// If any checker declares the state infeasible (or if it starts that way),
// bail out.
if (!state)
(Kind != PSK_DirectEscapeOnCall &&
Kind != PSK_IndirectEscapeOnCall)) &&
"Call must not be NULL when escaping on call");
- for (const auto PointerEscapeChecker : PointerEscapeCheckers) {
+ for (const auto &PointerEscapeChecker : PointerEscapeCheckers) {
// If any checker declares the state infeasible (or if it starts that
// way), bail out.
if (!State)
ProgramStateRef
CheckerManager::runCheckersForEvalAssume(ProgramStateRef state,
SVal Cond, bool Assumption) {
- for (const auto EvalAssumeChecker : EvalAssumeCheckers) {
+ for (const auto &EvalAssumeChecker : EvalAssumeCheckers) {
// If any checker declares the state infeasible (or if it starts that way),
// bail out.
if (!state)
NodeBuilder B(Pred, checkDst, Eng.getBuilderContext());
// Check if any of the EvalCall callbacks can evaluate the call.
- for (const auto EvalCallChecker : EvalCallCheckers) {
+ for (const auto &EvalCallChecker : EvalCallCheckers) {
// TODO: Support the situation when the call doesn't correspond
// to any Expr.
ProgramPoint L = ProgramPoint::getProgramPoint(
const TranslationUnitDecl *TU,
AnalysisManager &mgr,
BugReporter &BR) {
- for (const auto EndOfTranslationUnitChecker : EndOfTranslationUnitCheckers)
+ for (const auto &EndOfTranslationUnitChecker : EndOfTranslationUnitCheckers)
EndOfTranslationUnitChecker(TU, mgr, BR);
}
}
CheckerManager::~CheckerManager() {
- for (const auto CheckerDtor : CheckerDtors)
+ for (const auto &CheckerDtor : CheckerDtors)
CheckerDtor();
}