[[clang::sycl_kernel]]intgv2=0;// expected-warning {{'sycl_kernel' attribute only applies to function templates}}
__attribute__((sycl_kernel))intgv3=0;// expected-warning {{'sycl_kernel' attribute only applies to function templates}}
__attribute__((sycl_kernel))voidfoo();// expected-warning {{'sycl_kernel' attribute only applies to function templates}}
[[clang::sycl_kernel]]voidfoo1();// expected-warning {{'sycl_kernel' attribute only applies to function templates}}
// Attribute takes no arguments
template<typenameT,typenameA>
__attribute__((sycl_kernel(1)))voidfoo(TP);// expected-error {{'sycl_kernel' attribute takes no arguments}}
template<typenameT,typenameA,intI>
[[clang::sycl_kernel(1)]]voidfoo1(TP);// expected-error {{'sycl_kernel' attribute takes no arguments}}
// At least two template parameters
template<typenameT>
__attribute__((sycl_kernel))voidfoo(TP);// expected-warning {{'sycl_kernel' attribute only applies to a function template with at least two template parameters}}
template<typenameT>
[[clang::sycl_kernel]]voidfoo1(TP);// expected-warning {{'sycl_kernel' attribute only applies to a function template with at least two template parameters}}
// First two template parameters cannot be non-type template parameters
template<typenameT,intA>
__attribute__((sycl_kernel))voidfoo(TP);// expected-warning {{template parameter of a function template with the 'sycl_kernel' attribute cannot be a non-type template parameter}}
template<intA,typenameT>
[[clang::sycl_kernel]]voidfoo1(TP);// expected-warning {{template parameter of a function template with the 'sycl_kernel' attribute cannot be a non-type template parameter}}
// Must return void
template<typenameT,typenameA>
__attribute__((sycl_kernel))intfoo(TP);// expected-warning {{function template with 'sycl_kernel' attribute must have a 'void' return type}}
template<typenameT,typenameA>
[[clang::sycl_kernel]]intfoo1(TP);// expected-warning {{function template with 'sycl_kernel' attribute must have a 'void' return type}}
// Must take at least one argument
template<typenameT,typenameA>
__attribute__((sycl_kernel))voidfoo();// expected-warning {{function template with 'sycl_kernel' attribute must have a single parameter}}
template<typenameT,typenameA>
[[clang::sycl_kernel]]voidfoo1(Tt,Aa);// expected-warning {{function template with 'sycl_kernel' attribute must have a single parameter}}