Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(502)

Side by Side Diff: tools/clang/rewrite_scoped_array/RewriteScopedArray.cpp

Issue 13904002: Remove C++11 usage from Clang tools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/clang/empty_string/EmptyStringConverter.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // This implements a Clang tool to rewrite all instances of scoped_array<T> to 5 // This implements a Clang tool to rewrite all instances of scoped_array<T> to
6 // scoped_ptr<T[]>. The former is being deprecated in favor of the latter, to 6 // scoped_ptr<T[]>. The former is being deprecated in favor of the latter, to
7 // allow for an eventual transition from scoped_ptr to unique_ptr. 7 // allow for an eventual transition from scoped_ptr to unique_ptr.
8 8
9 #include "clang/AST/ASTContext.h" 9 #include "clang/AST/ASTContext.h"
10 #include "clang/ASTMatchers/ASTMatchers.h" 10 #include "clang/ASTMatchers/ASTMatchers.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 loc(qualType(hasDeclaration(recordDecl(hasName("::scoped_array")))))), 78 loc(qualType(hasDeclaration(recordDecl(hasName("::scoped_array")))))),
79 &callback); 79 &callback);
80 80
81 int result = 81 int result =
82 tool.run(clang::tooling::newFrontendActionFactory(&match_finder)); 82 tool.run(clang::tooling::newFrontendActionFactory(&match_finder));
83 if (result != 0) 83 if (result != 0)
84 return result; 84 return result;
85 85
86 // Serialization format is documented in tools/clang/scripts/run_tool.py 86 // Serialization format is documented in tools/clang/scripts/run_tool.py
87 llvm::outs() << "==== BEGIN EDITS ====\n"; 87 llvm::outs() << "==== BEGIN EDITS ====\n";
88 for (const Replacement& r : replacements) { 88 for (Replacements::const_iterator it = replacements.begin();
89 llvm::outs() << "r:" << r.getFilePath() << ":" << r.getOffset() << ":" 89 it != replacements.end(); ++it) {
90 << r.getLength() << ":" << r.getReplacementText() << "\n"; 90 llvm::outs() << "r:" << it->getFilePath() << ":" << it->getOffset() << ":"
91 << it->getLength() << ":" << it->getReplacementText() << "\n";
91 } 92 }
92 llvm::outs() << "==== END EDITS ====\n"; 93 llvm::outs() << "==== END EDITS ====\n";
93 94
94 return 0; 95 return 0;
95 } 96 }
OLDNEW
« no previous file with comments | « tools/clang/empty_string/EmptyStringConverter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698