[clang] [clang] Fix device_kernel attribute crash on unsupported targets when not using AMDGPU spelling (PR #161687)

Nick Sarnie via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 3 10:34:13 PDT 2025


================
@@ -55,6 +55,10 @@ int __attribute__((aarch64_vector_pcs)) aavpcs(void); // expected-warning {{'aar
 int __attribute__((aarch64_sve_pcs)) aasvepcs(void);  // expected-warning {{'aarch64_sve_pcs' calling convention is not supported for this target}}
 
 int __attribute__((amdgpu_kernel)) amdgpu_kernel(void); // expected-warning {{'amdgpu_kernel' calling convention is not supported for this target}}
+int __attribute__((device_kernel)) device_kernel(void) { // expected-warning {{'device_kernel' calling convention is not supported for this target}}
----------------
sarnex wrote:

fyi i added this test in locally so once i get to PR-level we'll have a log down for the crash

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


More information about the cfe-commits mailing list