llvm-project/clang/test/SemaSYCL/sycl-kernel-entry-point-attr-ignored.cpp
Oleksandr T. 2e8e254d18
[Clang] include attribute scope in diagnostics (#144619)
This patch updates diagnostics to print fully qualified attribute names,
including scope when present.
2025-07-08 11:36:52 +03:00

18 lines
618 B
C++

// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++17 -fsyntax-only -verify %s
// These tests validate that the sycl_kernel_entry_point attribute is ignored
// when SYCL support is not enabled.
// A unique kernel name type is required for each declared kernel entry point.
template<int> struct KN;
// expected-warning@+1 {{'clang::sycl_kernel_entry_point' attribute ignored}}
[[clang::sycl_kernel_entry_point(KN<1>)]]
void ok1();
// expected-warning@+2 {{'clang::sycl_kernel_entry_point' attribute ignored}}
template<typename KNT>
[[clang::sycl_kernel_entry_point(KNT)]]
void ok2() {}
template void ok2<KN<2>>();