llvm-project/clang/test/SemaSYCL/kernel-attribute-on-non-sycl.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

15 lines
495 B
C++

// RUN: %clang_cc1 -std=c++11 -fsyntax-only -fsycl-is-device -verify %s
// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify -x c++ %s
#ifndef __SYCL_DEVICE_ONLY__
// expected-warning@+7 {{'sycl_kernel' attribute ignored}}
// expected-warning@+8 {{'clang::sycl_kernel' attribute ignored}}
#else
// expected-no-diagnostics
#endif
template <typename T, typename A, int B>
__attribute__((sycl_kernel)) void foo(T P);
template <typename T, typename A, int B>
[[clang::sycl_kernel]] void foo1(T P);