r259409 - Code clean up; NFC.

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 1 13:28:33 PST 2016


Author: aaronballman
Date: Mon Feb  1 15:28:33 2016
New Revision: 259409

URL: http://llvm.org/viewvc/llvm-project?rev=259409&view=rev
Log:
Code clean up; NFC.

Patch by Alexander Riccio.

Modified:
    cfe/trunk/lib/StaticAnalyzer/Core/CheckerRegistry.cpp

Modified: cfe/trunk/lib/StaticAnalyzer/Core/CheckerRegistry.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/CheckerRegistry.cpp?rev=259409&r1=259408&r2=259409&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/CheckerRegistry.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/CheckerRegistry.cpp Mon Feb  1 15:28:33 2016
@@ -49,12 +49,12 @@ static void collectCheckers(const Checke
                             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 Checke
     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




More information about the cfe-commits mailing list