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

Unified Diff: tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp

Issue 1778963003: rewrite_to_chrome_style: Exclude methods before checking IsBlinkOrWTF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp
diff --git a/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp b/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp
index d0352ea9d5b6b1ea722feb3ef1df585ef1348dfb..3d12b5f0886a9f663ab28308a7cafefac6a8ed63 100644
--- a/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp
+++ b/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp
@@ -640,8 +640,7 @@ int main(int argc, const char* argv[]) {
// matches |g|.
auto method_decl_matcher =
id("decl",
- cxxMethodDecl(isBlinkOrWTFMethod(),
- unless(anyOf(is_generated,
+ cxxMethodDecl(unless(anyOf(is_generated,
// Overloaded operators have special names
// and should never be renamed.
isOverloadedOperator(),
@@ -649,7 +648,11 @@ int main(int argc, const char* argv[]) {
// conversion functions should not be
// considered for renaming.
cxxConstructorDecl(), cxxDestructorDecl(),
- cxxConversionDecl()))));
+ cxxConversionDecl())),
+ // Check this last after excluding things, to avoid
+ // asserts about overriding non-blink and blink for the
+ // same method.
+ isBlinkOrWTFMethod()));
MethodDeclRewriter method_decl_rewriter(&replacements);
match_finder.addMatcher(method_decl_matcher, &method_decl_rewriter);
« 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