From: Aaron Ballman Date: Mon, 1 Feb 2016 21:28:33 +0000 (+0000) Subject: Code clean up; NFC. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=16c73d924ef24e5545145d673a9f0c80257246ef;p=clang Code clean up; NFC. Patch by Alexander Riccio. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259409 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/StaticAnalyzer/Core/CheckerRegistry.cpp b/lib/StaticAnalyzer/Core/CheckerRegistry.cpp index a15e1573e2..ba03e2f8a3 100644 --- a/lib/StaticAnalyzer/Core/CheckerRegistry.cpp +++ b/lib/StaticAnalyzer/Core/CheckerRegistry.cpp @@ -49,12 +49,12 @@ static void collectCheckers(const CheckerRegistry::CheckerInfoList &checkers, CheckerOptInfo &opt, CheckerInfoSet &collected) { // Use a binary search to find the possible start of the package. CheckerRegistry::CheckerInfo packageInfo(nullptr, opt.getName(), ""); - CheckerRegistry::CheckerInfoList::const_iterator e = checkers.end(); + auto end = checkers.cend(); CheckerRegistry::CheckerInfoList::const_iterator i = - std::lower_bound(checkers.begin(), e, packageInfo, checkerNameLT); + std::lower_bound(checkers.cbegin(), end, packageInfo, checkerNameLT); // If we didn't even find a possible package, give up. - if (i == e) + if (i == end) return; // If what we found doesn't actually start the package, give up. @@ -73,7 +73,7 @@ static void collectCheckers(const CheckerRegistry::CheckerInfoList &checkers, size = packageSize->getValue(); // Step through all the checkers in the package. - for (e = i+size; i != e; ++i) { + for (auto checkEnd = i+size; i != checkEnd; ++i) { if (opt.isEnabled()) collected.insert(&*i); else