================
@@ -0,0 +1,34 @@
+// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++17 -fsyntax-only
-fsycl-is-host -verify %s
+// RUN: %clang_cc1 -triple spirv64-unknown-unknown -std=c++17 -fsyntax-only
-fsycl-is-device -verify %s
+// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++20 -fsyntax-only
-fsycl-is-host -verify %s
+// RUN: %clang_cc1 -triple spirv64-unknown-unknown -std=c++20 -fsyntax-only
-fsycl-is-device -verify %s
+
+// Test that sycl_kernel_entry_point functions with parameters of incomplete
+// type, or reference parameters that refer to incomplete types, are diagnosed
+// rather than crashing the compiler.
+
+template<int> struct KN;
+
+template<typename KernelName, typename... Ts>
+void sycl_kernel_launch(const char *, Ts &&...) {}
+
+struct S1; // expected-note 6{{forward declaration of 'S1'}}
+struct S2 { int val; };
+
----------------
dyniols wrote:
Added
https://github.com/llvm/llvm-project/pull/243185/changes/7dbfdbc6b8ee3ba0c84bf4021b124f294bf956c1
https://github.com/llvm/llvm-project/pull/243185
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits