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

Side by Side Diff: tools/clang/rewrite_scoped_refptr/RewriteScopedRefptr.cpp

Issue 723343002: Update from https://crrev.com/304121 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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') | tools/clang/scripts/run_tool.py » ('j') | 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 5 // This implements a Clang tool to rewrite all instances of
6 // scoped_refptr<T>'s implicit cast to T (operator T*) to an explicit call to 6 // scoped_refptr<T>'s implicit cast to T (operator T*) to an explicit call to
7 // the .get() method. 7 // the .get() method.
8 8
9 #include <assert.h> 9 #include <assert.h>
10 #include <algorithm> 10 #include <algorithm>
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 clang::tooling::newFrontendActionFactory(&match_finder); 412 clang::tooling::newFrontendActionFactory(&match_finder);
413 int result = tool.run(factory.get()); 413 int result = tool.run(factory.get());
414 if (result != 0) 414 if (result != 0)
415 return result; 415 return result;
416 416
417 // Serialization format is documented in tools/clang/scripts/run_tool.py 417 // Serialization format is documented in tools/clang/scripts/run_tool.py
418 llvm::outs() << "==== BEGIN EDITS ====\n"; 418 llvm::outs() << "==== BEGIN EDITS ====\n";
419 for (const auto& r : replacements) { 419 for (const auto& r : replacements) {
420 std::string replacement_text = r.getReplacementText().str(); 420 std::string replacement_text = r.getReplacementText().str();
421 std::replace(replacement_text.begin(), replacement_text.end(), '\n', '\0'); 421 std::replace(replacement_text.begin(), replacement_text.end(), '\n', '\0');
422 llvm::outs() << "r:" << r.getFilePath() << ":" << r.getOffset() << ":" 422 llvm::outs() << "r:::" << r.getFilePath() << ":::" << r.getOffset() << ":::"
423 << r.getLength() << ":" << replacement_text << "\n"; 423 << r.getLength() << ":::" << replacement_text << "\n";
424 } 424 }
425 llvm::outs() << "==== END EDITS ====\n"; 425 llvm::outs() << "==== END EDITS ====\n";
426 426
427 return 0; 427 return 0;
428 } 428 }
OLDNEW
« no previous file with comments | « tools/clang/empty_string/EmptyStringConverter.cpp ('k') | tools/clang/scripts/run_tool.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698