r215760 - [cleanup] Range-for'ify this loop. NFC.
Sean Silva
chisophugis at gmail.com
Fri Aug 15 12:23:50 PDT 2014
Author: silvas
Date: Fri Aug 15 14:23:50 2014
New Revision: 215760
URL: http://llvm.org/viewvc/llvm-project?rev=215760&view=rev
Log:
[cleanup] Range-for'ify this loop. NFC.
Modified:
cfe/trunk/tools/driver/driver.cpp
Modified: cfe/trunk/tools/driver/driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/driver.cpp?rev=215760&r1=215759&r2=215760&view=diff
==============================================================================
--- cfe/trunk/tools/driver/driver.cpp (original)
+++ cfe/trunk/tools/driver/driver.cpp Fri Aug 15 14:23:50 2014
@@ -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;
More information about the cfe-commits
mailing list