18 lines · cpp
1// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++17 -fsyntax-only -verify %s2 3// These tests validate that the sycl_kernel_entry_point attribute is ignored4// when SYCL support is not enabled.5 6// A unique kernel name type is required for each declared kernel entry point.7template<int> struct KN;8 9// expected-warning@+1 {{'clang::sycl_kernel_entry_point' attribute ignored}}10[[clang::sycl_kernel_entry_point(KN<1>)]]11void ok1();12 13// expected-warning@+2 {{'clang::sycl_kernel_entry_point' attribute ignored}}14template<typename KNT>15[[clang::sycl_kernel_entry_point(KNT)]]16void ok2() {}17template void ok2<KN<2>>();18