// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
// RUN: %clang_cc1 -std=c++1z -fsyntax-only -verify %s
// A forwarding reference is an rvalue reference to a cv-unqualified template
// parameter that does not represent a template parameter of a class template.
// If P is a forwarding reference and the argument is an lvalue, the type
// "lvalue reference to A" is used in place of A for type deduction.
;
X<T> ;
;
T ;
T&& ;
T& ;
void
X<T> ; // expected-note{{candidate function [with T = int] not viable: expects an rvalue for 1st argument}} \
// expected-note{{candidate function [with T = Y] not viable: expects an rvalue for 1st argument}}
void