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

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

Issue 2283553002: Extend |is_type_trait_value| matcher to cover |blink| namespace. (Closed)
Patch Set: Self-review. Created 4 years, 4 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/fields-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 9cb3adbc76dee1156e9524f4406b06d777c10c48..334aebe10cc333da6b8a8f3ae36f0d75be26be9e 100644
--- a/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp
+++ b/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp
@@ -578,13 +578,12 @@ int main(int argc, const char* argv[]) {
// };
// matches |x|, |y|, and |VALUE|.
auto field_decl_matcher = id("decl", fieldDecl(in_blink_namespace));
- auto is_wtf_type_trait_value =
- varDecl(hasName("value"), hasStaticStorageDuration(),
+ auto is_type_trait_value =
+ varDecl(hasName("value"), hasStaticStorageDuration(), isPublic(),
hasType(isConstQualified()), hasType(booleanType()),
- hasAncestor(recordDecl(hasAncestor(namespaceDecl(
- hasName("WTF"), hasParent(translationUnitDecl()))))));
+ unless(hasAncestor(recordDecl(has(functionDecl())))));
auto var_decl_matcher =
- id("decl", varDecl(in_blink_namespace, unless(is_wtf_type_trait_value)));
+ id("decl", varDecl(in_blink_namespace, unless(is_type_trait_value)));
auto enum_member_decl_matcher =
id("decl", enumConstantDecl(in_blink_namespace));
« no previous file with comments | « no previous file | tools/clang/rewrite_to_chrome_style/tests/fields-expected.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698