From 731b3becbfe59999d21e8f3a78322e523e893032 Mon Sep 17 00:00:00 2001 From: Sean Silva Date: Fri, 15 Aug 2014 19:23:50 +0000 Subject: [PATCH] [cleanup] Range-for'ify this loop. NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215760 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/driver/driver.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/driver/driver.cpp b/tools/driver/driver.cpp index 7938e69be7..2a762c0826 100644 --- a/tools/driver/driver.cpp +++ b/tools/driver/driver.cpp @@ -441,10 +441,9 @@ int main(int argc_, const char **argv_) { FailingCommands.push_back(std::make_pair(-1, FailingCommand)); } - for (SmallVectorImpl< std::pair >::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; -- 2.40.0