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

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

Issue 1617253002: rewrite_to_chrome_style: exclude conversion functions from being renamed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « tools/clang/rewrite_to_chrome_style/tests/methods-expected.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clang/rewrite_to_chrome_style/tests/methods-original.cc
diff --git a/tools/clang/rewrite_to_chrome_style/tests/methods-original.cc b/tools/clang/rewrite_to_chrome_style/tests/methods-original.cc
index cc764900833737b99dc014d4b57bb7e18f4aead3..8dc9b78932e6ae947f4a8e528b074fea5e71814e 100644
--- a/tools/clang/rewrite_to_chrome_style/tests/methods-original.cc
+++ b/tools/clang/rewrite_to_chrome_style/tests/methods-original.cc
@@ -16,7 +16,16 @@ class Task {
// Note: this is purposely copyable and assignable, to make sure the Clang
// tool doesn't try to emit replacements for things that aren't explicitly
// written.
- // TODO(dcheng): Add an explicit test for something like operator+.
+
+ // Overloaded operators should not be rewritten.
+ Task& operator++() {
+ return *this;
+ }
+
+ // Conversion functions should not be rewritten.
+ explicit operator int() const {
+ return 42;
+ }
};
// Test that the actual method definition is also updated.
« no previous file with comments | « tools/clang/rewrite_to_chrome_style/tests/methods-expected.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698