Index: tools/clang/base_bind_rewriters/tests/callback-temporary-converted-to-once-callback-original.cc |
diff --git a/tools/clang/base_bind_rewriters/tests/callback-temporary-converted-to-once-callback-original.cc b/tools/clang/base_bind_rewriters/tests/callback-temporary-converted-to-once-callback-original.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..66a7361b17c4ad09bf05989184a8b9040e4e241a |
--- /dev/null |
+++ b/tools/clang/base_bind_rewriters/tests/callback-temporary-converted-to-once-callback-original.cc |
@@ -0,0 +1,19 @@ |
+// Copyright 2017 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. |
+ |
+#include "callback.h" |
+ |
+void Foo(base::OnceClosure) {} |
+ |
+void Test() { |
+ base::OnceClosure cb = base::Bind([] {}); |
+ Foo(base::Bind([] {})); |
+ |
+ using namespace base; |
+ |
+ OnceClosure cb2 = Bind([] {}); |
+ Foo(Bind([] {})); |
+ |
+ Closure cb3 = base::Bind([] {}); |
+} |