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

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: . 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..fd2a1c7e823ce2ae1c4b5f94163aa3f48ad5cc46 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,22 @@ 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() {}
+ // The trace() method is used by Oilpan, we shouldn't rename it.
+ void trace() {}
+};
+
+class Other {
+ // Static begin/end/trace don't count, and should be renamed.
+ static void Begin() {}
+ static void End() {}
+ static void Trace() {}
};
// Test that the actual method definition is also updated.

Powered by Google App Engine
This is Rietveld 408576698