CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
41 lines
1.5 KiB
C++
41 lines
1.5 KiB
C++
// Test that SYCL kernel name conflicts that occur across PCH boundaries are
|
|
// properly diagnosed.
|
|
|
|
// RUN: rm -rf %t
|
|
// RUN: split-file %s %t
|
|
// RUN: %clang_cc1 -std=c++17 -fsycl-is-host -emit-pch -x c++-header \
|
|
// RUN: %t/pch.h -o %t/pch.h.host.pch
|
|
// RUN: %clang_cc1 -std=c++17 -fsycl-is-host -verify \
|
|
// RUN: -include-pch %t/pch.h.host.pch %t/test.cpp
|
|
// RUN: %clang_cc1 -std=c++17 -fsycl-is-device -emit-pch -x c++-header \
|
|
// RUN: %t/pch.h -o %t/pch.h.device.pch
|
|
// RUN: %clang_cc1 -std=c++17 -fsycl-is-device -verify \
|
|
// RUN: -include-pch %t/pch.h.device.pch %t/test.cpp
|
|
|
|
#--- pch.h
|
|
template<int> struct KN;
|
|
|
|
// A generic kernel launch function.
|
|
template<typename KN, typename... Ts>
|
|
void sycl_kernel_launch(const char *, Ts...) {}
|
|
|
|
[[clang::sycl_kernel_entry_point(KN<1>)]]
|
|
void pch_test1() {} // << expected previous declaration note here.
|
|
|
|
template<typename T>
|
|
[[clang::sycl_kernel_entry_point(T)]]
|
|
void pch_test2() {} // << expected previous declaration note here.
|
|
template void pch_test2<KN<2>>();
|
|
|
|
|
|
#--- test.cpp
|
|
// expected-error@+3 {{the 'clang::sycl_kernel_entry_point' kernel name argument conflicts with a previous declaration}}
|
|
// expected-note@pch.h:8 {{previous declaration is here}}
|
|
[[clang::sycl_kernel_entry_point(KN<1>)]]
|
|
void test1() {}
|
|
|
|
// expected-error@+3 {{the 'clang::sycl_kernel_entry_point' kernel name argument conflicts with a previous declaration}}
|
|
// expected-note@pch.h:12 {{previous declaration is here}}
|
|
[[clang::sycl_kernel_entry_point(KN<2>)]]
|
|
void test2() {}
|