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

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

Issue 2625903006: Blacklist renaming inside blink::protocol namespace. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/clang/rewrite_to_chrome_style/tests/namespaces-expected.cc » ('j') | 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 c3d3356d2542a138cf35bdd3f4e086eb357d4983..18ad4cbcb095e045d51206173052280ba46eb853 100644
--- a/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp
+++ b/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp
@@ -1042,13 +1042,19 @@ int main(int argc, const char* argv[]) {
auto blink_namespace_decl =
namespaceDecl(anyOf(hasName("blink"), hasName("WTF")),
hasParent(translationUnitDecl()));
+ auto protocol_namespace_decl =
+ namespaceDecl(hasName("protocol"),
+ hasParent(namespaceDecl(hasName("blink"),
+ hasParent(translationUnitDecl()))));
// Given top-level compilation unit:
// namespace WTF {
// void foo() {}
// }
// matches |foo|.
- auto decl_under_blink_namespace = decl(hasAncestor(blink_namespace_decl));
+ auto decl_under_blink_namespace =
+ decl(hasAncestor(blink_namespace_decl),
+ unless(hasAncestor(protocol_namespace_decl)));
// Given top-level compilation unit:
// void WTF::function() {}
« no previous file with comments | « no previous file | tools/clang/rewrite_to_chrome_style/tests/namespaces-expected.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698