[clang-tools-extra] r228993 - Modularize.cpp: Simplify. Vector may be aware of ranged-for.
NAKAMURA Takumi
geek4civic at gmail.com
Thu Feb 12 16:28:32 PST 2015
Author: chapuni
Date: Thu Feb 12 18:28:32 2015
New Revision: 228993
URL: http://llvm.org/viewvc/llvm-project?rev=228993&view=rev
Log:
Modularize.cpp: Simplify. Vector may be aware of ranged-for.
Modified:
clang-tools-extra/trunk/modularize/Modularize.cpp
Modified: clang-tools-extra/trunk/modularize/Modularize.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/modularize/Modularize.cpp?rev=228993&r1=228992&r2=228993&view=diff
==============================================================================
--- clang-tools-extra/trunk/modularize/Modularize.cpp (original)
+++ clang-tools-extra/trunk/modularize/Modularize.cpp Thu Feb 12 18:28:32 2015
@@ -709,12 +709,11 @@ int main(int Argc, const char **Argv) {
// Get header file names and dependencies.
SmallVector<std::string, 32> Headers;
DependencyMap Dependencies;
- typedef std::vector<std::string>::iterator Iter;
- for (Iter I = ListFileNames.begin(), E = ListFileNames.end(); I != E; ++I) {
- if (std::error_code EC = getHeaderFileNames(Headers, Dependencies,
- *I, HeaderPrefix)) {
- errs() << Argv[0] << ": error: Unable to get header list '" << *I
- << "': " << EC.message() << '\n';
+ for (auto I : ListFileNames) {
+ if (std::error_code EC =
+ getHeaderFileNames(Headers, Dependencies, I, HeaderPrefix)) {
+ errs() << Argv[0] << ": error: Unable to get header list '" << I
+ << "': " << EC.message() << '\n';
return 1;
}
}
More information about the cfe-commits
mailing list