================
@@ -113,6 +113,31 @@ class D {
 // expected-error@+1{{'clang::sycl_external' cannot be applied to an 
explicitly deleted function}}
 [[clang::sycl_external]] void del() = delete;
 
+// SYCL device code does not support variadic functions.
+// expected-warning@+1{{'clang::sycl_external' attribute ignored; a variadic 
function cannot be called from device code}}
+[[clang::sycl_external]] void var(int, ...) {}
+
+// expected-warning@+1{{'clang::sycl_external' attribute ignored; a variadic 
function cannot be called from device code}}
+[[clang::sycl_external]] void vardecl(int, ...);
+
+// expected-warning@+1{{'clang::sycl_external' attribute ignored; a variadic 
function cannot be called from device code}}
+[[clang::sycl_external]] void varredecl(int, ...);
+// expected-warning@+1{{'clang::sycl_external' attribute ignored; a variadic 
function cannot be called from device code}}
+[[clang::sycl_external]] void varredecl(int, ...) {}
----------------
tahonermann wrote:

Good catch testing redeclarations! I'm not sure I would have thought of testing 
that!

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