================
@@ -5,20 +5,21 @@
 // RUN: %clang_cc1 -triple spirv64-unknown-unknown -aux-triple 
x86_64-pc-windows-msvc \
 // RUN:   -fsycl-is-device -emit-llvm -o - %s | FileCheck 
--check-prefix=WINDOWS %s
 
-[[clang::sycl_external]] int f(int n, ...) {
+/// No variadic functions in SYCL device code, so 'ap' comes from the caller.
+[[clang::sycl_external]] int f(__builtin_va_list *ap) {
   __builtin_va_list ap1, ap2;
-  __builtin_va_start(ap1, n);
+  __builtin_va_copy(ap1, *ap);
----------------
tahonermann wrote:

Sorry, I added that comment before @Fznamznon offered the better suggestion to 
ignore the attribute. The change you ended up making here looks perfect!

https://github.com/llvm/llvm-project/pull/216393
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to