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

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

Issue 1839573002: rewrite_to_chrome_style: making globals great again. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 4 years, 9 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/variables-expected.cc
diff --git a/tools/clang/rewrite_to_chrome_style/tests/variables-expected.cc b/tools/clang/rewrite_to_chrome_style/tests/variables-expected.cc
index cf450b062ae389951f6b82920a5d68061cf3c911..119edd678dff23b45788d267ccf462bc4130749b 100644
--- a/tools/clang/rewrite_to_chrome_style/tests/variables-expected.cc
+++ b/tools/clang/rewrite_to_chrome_style/tests/variables-expected.cc
@@ -5,11 +5,13 @@
namespace blink {
// Global variables
-int frame_count = 0;
+int g_frame_count = 0;
// Make sure that underscore-insertion doesn't get too confused by acronyms.
-static int variable_mentioning_http_and_https = 1;
+static int g_variable_mentioning_http_and_https = 1;
+// g_ prefix, but doesn't follow Google style.
+int g_with_blink_naming;
// Already Google style, should not change.
-int already_google_style_;
+int g_already_google_style_;
// Function parameters
int Function(int interesting_number) {
@@ -18,17 +20,17 @@ int Function(int interesting_number) {
// Static locals.
static int a_static_local_variable = 2;
// Make sure references to variables are also rewritten.
- return frame_count +
- variable_mentioning_http_and_https * interesting_number /
+ return g_frame_count +
+ g_variable_mentioning_http_and_https * interesting_number /
a_local_variable % a_static_local_variable;
}
} // namespace blink
-using blink::frame_count;
+using blink::g_frame_count;
int F() {
// Make sure variables qualified with a namespace name are still rewritten
// correctly.
- return frame_count + blink::frame_count;
+ return g_frame_count + blink::g_frame_count;
}

Powered by Google App Engine
This is Rietveld 408576698