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

Side by Side Diff: tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp

Issue 2646803002: Make sure InspectorBaseAgent::disable is not renamed. (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 // Changes Blink-style names to Chrome-style names. Currently transforms: 5 // Changes Blink-style names to Chrome-style names. Currently transforms:
6 // fields: 6 // fields:
7 // int m_operationCount => int operation_count_ 7 // int m_operationCount => int operation_count_
8 // variables (including parameters): 8 // variables (including parameters):
9 // int mySuperVariable => int my_super_variable 9 // int mySuperVariable => int my_super_variable
10 // constants: 10 // constants:
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 if (decl.isStatic()) 461 if (decl.isStatic())
462 return false; 462 return false;
463 463
464 if (IsBlacklistedInstanceMethodName(name)) 464 if (IsBlacklistedInstanceMethodName(name))
465 return true; 465 return true;
466 466
467 // Subclasses of InspectorAgent will subclass "disable()" from both blink and 467 // Subclasses of InspectorAgent will subclass "disable()" from both blink and
468 // from gen/, which is problematic, but DevTools folks don't want to rename 468 // from gen/, which is problematic, but DevTools folks don't want to rename
469 // it or split this up. So don't rename it at all. 469 // it or split this up. So don't rename it at all.
470 if (name.equals("disable") && 470 if (name.equals("disable") &&
471 IsMethodOverrideOf(decl, "blink::InspectorAgent")) 471 IsMethodOverrideOf(decl, "blink::InspectorBaseAgent"))
472 return true; 472 return true;
473 473
474 return false; 474 return false;
475 } 475 }
476 476
477 AST_MATCHER(clang::FunctionDecl, isBlacklistedFunction) { 477 AST_MATCHER(clang::FunctionDecl, isBlacklistedFunction) {
478 return IsBlacklistedFunction(Node); 478 return IsBlacklistedFunction(Node);
479 } 479 }
480 480
481 AST_MATCHER(clang::CXXMethodDecl, isBlacklistedMethod) { 481 AST_MATCHER(clang::CXXMethodDecl, isBlacklistedMethod) {
(...skipping 1309 matching lines...) Expand 10 before | Expand all | Expand 10 after
1791 for (const auto& r : replacements) { 1791 for (const auto& r : replacements) {
1792 std::string replacement_text = r.getReplacementText().str(); 1792 std::string replacement_text = r.getReplacementText().str();
1793 std::replace(replacement_text.begin(), replacement_text.end(), '\n', '\0'); 1793 std::replace(replacement_text.begin(), replacement_text.end(), '\n', '\0');
1794 llvm::outs() << "r:::" << r.getFilePath() << ":::" << r.getOffset() 1794 llvm::outs() << "r:::" << r.getFilePath() << ":::" << r.getOffset()
1795 << ":::" << r.getLength() << ":::" << replacement_text << "\n"; 1795 << ":::" << r.getLength() << ":::" << replacement_text << "\n";
1796 } 1796 }
1797 llvm::outs() << "==== END EDITS ====\n"; 1797 llvm::outs() << "==== END EDITS ====\n";
1798 1798
1799 return 0; 1799 return 0;
1800 } 1800 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698