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

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

Issue 1647763002: rewrite_to_chrome_style: Don't rename begin()/end()/rbegin()/rend(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rewrite-begin-end: not-static-methods 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/methods-expected.cc
diff --git a/tools/clang/rewrite_to_chrome_style/tests/methods-expected.cc b/tools/clang/rewrite_to_chrome_style/tests/methods-expected.cc
index 0b35d834a63bd59fdcfe948b60b48a9f623d0a30..e3598491c8fd14f4cfd84b194c5541f5afc4bbc4 100644
--- a/tools/clang/rewrite_to_chrome_style/tests/methods-expected.cc
+++ b/tools/clang/rewrite_to_chrome_style/tests/methods-expected.cc
@@ -22,6 +22,19 @@ class Task {
// Conversion functions should not be rewritten.
explicit operator int() const { return 42; }
+
+ // These are special functions that we don't rename so that range-based
+ // for loops and STL things work.
+ void begin() {}
+ void end() {}
+ void rbegin() {}
+ void rend() {}
+};
+
+class Other {
+ // Static begin/end don't count, and should be renamed.
+ static void Begin() {}
+ static void End() {}
};
// Test that the actual method definition is also updated.

Powered by Google App Engine
This is Rietveld 408576698