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