[clang] [clang] Check validity of SYCL device target (PR #172366)

Tom Honermann via cfe-commits cfe-commits at lists.llvm.org
Sun Apr 26 18:05:07 PDT 2026


================
@@ -286,11 +286,6 @@ consteval void bad25() {}
 [[clang::sycl_kernel_entry_point(BADKN<26>)]]
 [[noreturn]] void bad26();
 
-// expected-error at +3 {{attribute 'target' multiversioning cannot be combined with attribute 'clang::sycl_kernel_entry_point'}}
-__attribute__((target("avx"))) void bad27();
-[[clang::sycl_kernel_entry_point(BADKN<27>)]]
-__attribute__((target("sse4.2"))) void bad27();
----------------
tahonermann wrote:

Can we preserve this test case for host compilation? We should be able to put it in a `#if !defined(__SYCL_DEVICE_ONLY__)` block.

https://github.com/llvm/llvm-project/pull/172366


More information about the cfe-commits mailing list