diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/clang/empty_string/EmptyStringConverter.cpp | 9 | ||||
-rw-r--r-- | tools/clang/rewrite_scoped_array/RewriteScopedArray.cpp | 7 |
2 files changed, 9 insertions, 7 deletions
diff --git a/tools/clang/empty_string/EmptyStringConverter.cpp b/tools/clang/empty_string/EmptyStringConverter.cpp index bfdf7ef..421f964 100644 --- a/tools/clang/empty_string/EmptyStringConverter.cpp +++ b/tools/clang/empty_string/EmptyStringConverter.cpp @@ -96,7 +96,7 @@ class EmptyStringConverter { }; void EmptyStringConverter::SetupMatchers(MatchFinder* match_finder) { - const auto& constructor_call = + const clang::ast_matchers::StatementMatcher& constructor_call = id("call", constructExpr( hasDeclaration(methodDecl(ofClass(hasName("std::basic_string")))), @@ -189,9 +189,10 @@ int main(int argc, const char* argv[]) { // Only the <replacement text> field can contain embedded ":" characters. // TODO(dcheng): Use a more clever serialization. llvm::outs() << "==== BEGIN EDITS ====\n"; - for (const Replacement& r : replacements) { - llvm::outs() << "r:" << r.getFilePath() << ":" << r.getOffset() << ":" - << r.getLength() << ":" << r.getReplacementText() << "\n"; + for (Replacements::const_iterator it = replacements.begin(); + it != replacements.end(); ++it) { + llvm::outs() << "r:" << it->getFilePath() << ":" << it->getOffset() << ":" + << it->getLength() << ":" << it->getReplacementText() << "\n"; } llvm::outs() << "==== END EDITS ====\n"; diff --git a/tools/clang/rewrite_scoped_array/RewriteScopedArray.cpp b/tools/clang/rewrite_scoped_array/RewriteScopedArray.cpp index f465411..a09d535 100644 --- a/tools/clang/rewrite_scoped_array/RewriteScopedArray.cpp +++ b/tools/clang/rewrite_scoped_array/RewriteScopedArray.cpp @@ -85,9 +85,10 @@ int main(int argc, const char* argv[]) { // Serialization format is documented in tools/clang/scripts/run_tool.py llvm::outs() << "==== BEGIN EDITS ====\n"; - for (const Replacement& r : replacements) { - llvm::outs() << "r:" << r.getFilePath() << ":" << r.getOffset() << ":" - << r.getLength() << ":" << r.getReplacementText() << "\n"; + for (Replacements::const_iterator it = replacements.begin(); + it != replacements.end(); ++it) { + llvm::outs() << "r:" << it->getFilePath() << ":" << it->getOffset() << ":" + << it->getLength() << ":" << it->getReplacementText() << "\n"; } llvm::outs() << "==== END EDITS ====\n"; |