]> granicus.if.org Git - clang/commitdiff
Code clean up; NFC.
authorAaron Ballman <aaron@aaronballman.com>
Mon, 1 Feb 2016 21:28:33 +0000 (21:28 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Mon, 1 Feb 2016 21:28:33 +0000 (21:28 +0000)
Patch by Alexander Riccio.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259409 91177308-0d34-0410-b5e6-96231b3b80d8

lib/StaticAnalyzer/Core/CheckerRegistry.cpp

index a15e1573e228b1ae2fc9fdee2703a1f7c6f8de60..ba03e2f8a3c18d8dc84fbf878ff789612f327c89 100644 (file)
@@ -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