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

Unified Diff: tools/clang/base_bind_rewriters/tests/test-expected.cc

Issue 2283003002: Remove unneeded scoped_refptr<>::get on method bind (Closed)
Patch Set: update Created 4 years, 4 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/base_bind_rewriters/tests/test-expected.cc
diff --git a/tools/clang/base_bind_rewriters/tests/test-expected.cc b/tools/clang/base_bind_rewriters/tests/test-expected.cc
new file mode 100644
index 0000000000000000000000000000000000000000..59a3b1c464de0034b55301a603bb95b54d98ff7b
--- /dev/null
+++ b/tools/clang/base_bind_rewriters/tests/test-expected.cc
@@ -0,0 +1,35 @@
+// 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.
+
+template <typename>
+class scoped_refptr {
+ public:
+ void* get() { return 0; }
+};
+
+namespace base {
+
+template <typename Functor, typename... Args>
+void Bind(Functor&&, Args&&...) {}
+
+} // namespace base
+
+struct Foo {
+ void Bar();
+ static void Baz();
+};
+
+void Test() {
+ using base::Bind;
+ scoped_refptr<int> foo;
+ base::Bind(&Foo::Bar, foo);
+ Bind(&Foo::Bar, foo);
+ base::Bind(&Foo::Bar, (&foo));
+ base::Bind(&Foo::Bar, foo);
+ base::Bind(&Foo::Bar, foo);
+ base::Bind(&Foo::Bar, foo, foo.get());
+ base::Bind(&Foo::Baz, foo.get());
+ base::Bind(&Foo::Bar, foo);
+ base::Bind(&Foo::Bar, (&foo));
+}
« no previous file with comments | « tools/clang/base_bind_rewriters/CMakeLists.txt ('k') | tools/clang/base_bind_rewriters/tests/test-original.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698