[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaSYCL / sycl-kernel-entry-point-attr-ignored.cpp
blob30de6ae0b0e6f95b6cc0e0ef15b3d3921382c0c6
1 // RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++17 -fsyntax-only -verify %s
3 // These tests validate that the sycl_kernel_entry_point attribute is ignored
4 // when SYCL support is not enabled.
6 // A unique kernel name type is required for each declared kernel entry point.
7 template<int> struct KN;
9 // expected-warning@+1 {{'sycl_kernel_entry_point' attribute ignored}}
10 [[clang::sycl_kernel_entry_point(KN<1>)]]
11 void ok1();
13 // expected-warning@+2 {{'sycl_kernel_entry_point' attribute ignored}}
14 template<typename KNT>
15 [[clang::sycl_kernel_entry_point(KNT)]]
16 void ok2() {}
17 template void ok2<KN<2>>();