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

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

Issue 1612223002: rewrite_to_chrome_style: Handle non-method overloaded operators (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rewrite-operators: commentfix 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/operators-expected.cc
diff --git a/tools/clang/rewrite_to_chrome_style/tests/operators-expected.cc b/tools/clang/rewrite_to_chrome_style/tests/operators-expected.cc
new file mode 100644
index 0000000000000000000000000000000000000000..7f470c658b61701df216284f659d4b7a819d68e5
--- /dev/null
+++ b/tools/clang/rewrite_to_chrome_style/tests/operators-expected.cc
@@ -0,0 +1,25 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+namespace blink {
+
+struct Op {
+ bool operator==(const Op&) { return true; }
+};
+
+struct Op2 {};
+
+inline bool operator==(const Op2&, const Op2) {
+ return true;
+}
+
+} // namespace
+
+void G() {
+ blink::Op a, b;
+ bool c = a == b;
+
+ blink::Op2 a2, b2;
+ bool c2 = a2 == b2;
+}

Powered by Google App Engine
This is Rietveld 408576698