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