From dbb0c75977287947e02f0ae539e1213147810a4b Mon Sep 17 00:00:00 2001 From: Alp Toker Date: Sun, 6 Jul 2014 06:09:20 +0000 Subject: [PATCH] Modernize a couple of loops llvm-svn: 212394 --- clang/lib/ARCMigrate/PlistReporter.cpp | 7 ++----- clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/clang/lib/ARCMigrate/PlistReporter.cpp b/clang/lib/ARCMigrate/PlistReporter.cpp index cd55625..09cb505 100644 --- a/clang/lib/ARCMigrate/PlistReporter.cpp +++ b/clang/lib/ARCMigrate/PlistReporter.cpp @@ -73,11 +73,8 @@ void arcmt::writeARCDiagsToPlist(const std::string &outPath, " files\n" " \n"; - for (SmallVectorImpl::iterator I=Fids.begin(), E=Fids.end(); - I!=E; ++I) { - o << " "; - EmitString(o, SM.getFileEntryForID(*I)->getName()) << '\n'; - } + for (FileID FID : Fids) + EmitString(o << " ", SM.getFileEntryForID(FID)->getName()) << '\n'; o << " \n" " diagnostics\n" diff --git a/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp b/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp index 9b7cc51..ff2735d 100644 --- a/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp +++ b/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp @@ -358,11 +358,8 @@ void PlistDiagnostics::FlushDiagnosticsImpl( o << " files\n" " \n"; - for (SmallVectorImpl::iterator I=Fids.begin(), E=Fids.end(); - I!=E; ++I) { - o << " "; - EmitString(o, SM->getFileEntryForID(*I)->getName()) << '\n'; - } + for (FileID FID : Fids) + EmitString(o << " ", SM->getFileEntryForID(FID)->getName()) << '\n'; o << " \n" " diagnostics\n" -- 2.7.4