[clang] [clang][HIP] Normalize __cdecl on abstract function types to the device default CC on amdgcnspirv (PR #210882)
Mariya Podchishchaeva via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 7 04:36:06 PDT 2026
================
@@ -1,11 +1,12 @@
// RUN: %clang_cc1 -isystem %S/Inputs/ -fsycl-is-device -triple spirv64 -aux-triple x86_64-pc-windows-msvc -fsyntax-only -verify %s
// RUN: %clang_cc1 -isystem %S/Inputs/ -fsycl-is-device -triple spirv64 -fsyntax-only -verify=expected,no-aux %s
-// Check that there is no error/warning emitted for cdecl functions compiled for
-// SYCL device. Make sure variadic calls from within device code are diagnosed.
+// Check that there is no error/warning emitted for non-variadic cdecl functions
+// compiled for SYCL device. Make sure variadic cdecl functions and variadic
+// calls from within device code are diagnosed.
// no-aux-warning at +2 {{'__cdecl' calling convention is not supported for this target}}
-// no-aux-error at +1 {{variadic function cannot use spir_function calling convention}}
+// expected-error at +1 {{variadic function cannot use cdecl calling convention}}
----------------
Fznamznon wrote:
Yeah, that is now not entirely correct from SYCL perspective, because that function is never called from the device code. We probably just need to defer the error for SYCL, probably in a separate patch.
https://github.com/llvm/llvm-project/pull/210882
More information about the cfe-commits
mailing list