Bug 1879449 [wpt PR 44489] - [wptrunner] Add `infrastructure/expected-fail/` test...
[gecko.git] / tools / clang-tidy / test / bugprone-move-forwarding-reference.cpp
blob45be15ee6530051189735d8eb4816d5ee81ceb4a
2 namespace std {
3 template <typename> struct remove_reference;
5 template <typename _Tp> struct remove_reference { typedef _Tp type; };
7 template <typename _Tp> struct remove_reference<_Tp &> { typedef _Tp type; };
9 template <typename _Tp> struct remove_reference<_Tp &&> { typedef _Tp type; };
11 template <typename _Tp>
12 constexpr typename std::remove_reference<_Tp>::type &&move(_Tp &&__t);
14 } // namespace std
16 // Standard case.
17 template <typename T, typename U> void f1(U &&SomeU) {
18 T SomeT(std::move(SomeU));
19 // CHECK-MESSAGES: :[[@LINE-1]]:11: warning: forwarding reference passed to
20 // CHECK-FIXES: T SomeT(std::forward<U>(SomeU));
23 void foo() {
24 f1<int, int>(2);