1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fsyntax-only -verify %s 2*f4a2713aSLionel Sambuc 3*f4a2713aSLionel Sambuc template<typename T, T Value> struct Constant; // expected-note{{template parameter is declared here}} \ 4*f4a2713aSLionel Sambuc // FIXME: bad location expected-error{{a non-type template parameter cannot have type 'float'}} 5*f4a2713aSLionel Sambuc 6*f4a2713aSLionel Sambuc Constant<int, 5> *c1; 7*f4a2713aSLionel Sambuc 8*f4a2713aSLionel Sambuc int x; 9*f4a2713aSLionel Sambuc float f(int, double); 10*f4a2713aSLionel Sambuc 11*f4a2713aSLionel Sambuc Constant<int&, x> *c2; 12*f4a2713aSLionel Sambuc Constant<int*, &x> *c3; 13*f4a2713aSLionel Sambuc Constant<float (*)(int, double), f> *c4; 14*f4a2713aSLionel Sambuc Constant<float (*)(int, double), &f> *c5; 15*f4a2713aSLionel Sambuc 16*f4a2713aSLionel Sambuc Constant<float (*)(int, int), f> *c6; // expected-error{{non-type template argument of type 'float (int, double)' cannot be converted to a value of type 'float (*)(int, int)'}} 17*f4a2713aSLionel Sambuc 18*f4a2713aSLionel Sambuc Constant<float, 0> *c7; // expected-note{{while substituting}} 19