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

Unified Diff: tools/clang/rewrite_to_chrome_style/tests/fields-original.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: Fix bad renaming 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-original.cc
diff --git a/tools/clang/rewrite_to_chrome_style/tests/fields-original.cc b/tools/clang/rewrite_to_chrome_style/tests/fields-original.cc
index 0e1159b7ce64fd23a0d3fdab4b98adfeb805a58f..2710d237efcc4d2afd7dc1710e3a49cb22d64084 100644
--- a/tools/clang/rewrite_to_chrome_style/tests/fields-original.cc
+++ b/tools/clang/rewrite_to_chrome_style/tests/fields-original.cc
@@ -14,9 +14,11 @@ class C {
return instanceCount + m_flagField + m_fieldMentioningHTTPAndHTTPS;
}
- private:
- // The m_ prefix, if any, should be removed.
+ // Test that a field without a m_ prefix is correctly renamed.
static int instanceCount;
+
+ private:
+ // Test that a field with a m_ prefix is correctly renamed.
const int m_flagField;
// Statics should be named with s_, but make sure s_ and m_ are both correctly
// stripped.
@@ -44,3 +46,8 @@ union U {
};
} // namespace blink
+
+void F() {
+ // Test that references to a static field are correctly rewritten.
+ blink::C::instanceCount++;
+}

Powered by Google App Engine
This is Rietveld 408576698