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

Unified Diff: tools/clang/rewrite_to_chrome_style/tests/fields-expected.cc

Issue 1557243002: Update rewrite_to_chrome_style tool to also rename methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Group more logically Created 4 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
Index: tools/clang/rewrite_to_chrome_style/tests/fields-expected.cc
diff --git a/tools/clang/rewrite_to_chrome_style/tests/fields-expected.cc b/tools/clang/rewrite_to_chrome_style/tests/fields-expected.cc
index c94c50dd2ac546a0d8aa4f5b796a71269fa4e072..3b29f95701e595d287ec4c8f0f549bdd5a98f8a7 100644
--- a/tools/clang/rewrite_to_chrome_style/tests/fields-expected.cc
+++ b/tools/clang/rewrite_to_chrome_style/tests/fields-expected.cc
@@ -9,14 +9,15 @@ class C {
// Make sure initializers are updated to use the new names.
C() : flag_field_(~0), field_mentioning_http_and_https_(1) {}
- int method() {
+ int Method() {
// Test that references to fields are updated correctly.
return instance_count_ + flag_field_ + field_mentioning_http_and_https_;
}
- private:
// The m_ prefix, if any, should be removed.
static int instance_count_;
+
+ private:
const int flag_field_;
// Statics should be named with s_, but make sure s_ and m_ are both correctly
// stripped.
@@ -44,3 +45,8 @@ union U {
};
} // namespace blink
+
+void F() {
+ // Test that references to a static field are correctly rewritten.
+ blink::C::instance_count_++;
+}

Powered by Google App Engine
This is Rietveld 408576698