From: Sean Silva Date: Fri, 15 Aug 2014 19:23:50 +0000 (+0000) Subject: [cleanup] Range-for'ify this loop. NFC. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=731b3becbfe59999d21e8f3a78322e523e893032;p=clang [cleanup] Range-for'ify this loop. NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215760 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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;