namespace std { template struct remove_reference; template struct remove_reference { typedef _Tp type; }; template struct remove_reference<_Tp &> { typedef _Tp type; }; template struct remove_reference<_Tp &&> { typedef _Tp type; }; template constexpr typename std::remove_reference<_Tp>::type &&move(_Tp &&__t); } // namespace std // Standard case. template void f1(U &&SomeU) { T SomeT(std::move(SomeU)); // CHECK-MESSAGES: :[[@LINE-1]]:11: warning: forwarding reference passed to // CHECK-FIXES: T SomeT(std::forward(SomeU)); } void foo() { f1(2); }