diff options
author | dcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-09 05:46:40 +0000 |
---|---|---|
committer | dcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-09 05:46:40 +0000 |
commit | 9f2c09172ab9fb107d64718489bc3be2114b8a05 (patch) | |
tree | dffea7992fdad7ec8e14c3ebfb5fcf974e84350f | |
parent | 270428f3e0d6a7b5b317e4c30d3005fbe252f6c1 (diff) | |
download | chromium_src-9f2c09172ab9fb107d64718489bc3be2114b8a05.zip chromium_src-9f2c09172ab9fb107d64718489bc3be2114b8a05.tar.gz chromium_src-9f2c09172ab9fb107d64718489bc3be2114b8a05.tar.bz2 |
Remove C++11 usage from Clang tools.
I guess I shouldn't have ignored the compiler warnings.
BUG=
Review URL: https://codereview.chromium.org/13904002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193023 0039d316-1c4b-4281-b951-d872f2087c98
-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"; |