| 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() {}
|
|
|