]> granicus.if.org Git - clang/commitdiff
[cleanup] Range-for'ify this loop. NFC.
authorSean Silva <chisophugis@gmail.com>
Fri, 15 Aug 2014 19:23:50 +0000 (19:23 +0000)
committerSean Silva <chisophugis@gmail.com>
Fri, 15 Aug 2014 19:23:50 +0000 (19:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215760 91177308-0d34-0410-b5e6-96231b3b80d8

tools/driver/driver.cpp

index 7938e69be7416f8659652b2ed7e6aaf4154b7253..2a762c082615d8822ec6ffbdb34ec7759c9806da 100644 (file)
@@ -441,10 +441,9 @@ int main(int argc_, const char **argv_) {
     FailingCommands.push_back(std::make_pair(-1, FailingCommand));
   }
 
-  for (SmallVectorImpl< std::pair<int, const Command *> >::iterator it =
-         FailingCommands.begin(), ie = FailingCommands.end(); it != ie; ++it) {
-    int CommandRes = it->first;
-    const Command *FailingCommand = it->second;
+  for (const auto &P : FailingCommands) {
+    int CommandRes = P.first;
+    const Command *FailingCommand = P.second;
     if (!Res)
       Res = CommandRes;