================
@@ -0,0 +1,15 @@
+// In incremental mode (clang-repl) statements may appear at the top level, so 
a
+// HIP kernel launch can have no enclosing caller function. During device
+// compilation such a launch must be accepted (treated as a host-side launch)
+// rather than rejected as an unsupported device-side kernel launch.
+
+// RUN: %clang_cc1 -fsyntax-only -triple amdgcn-amd-amdhsa -fcud a-is-device 
-x hip -fincremental-extensions -verify %s
+
+// expected-no-diagnostics
+
+#include "Inputs/cuda.h"
+
+__global__ void kernel() {}
+
+// Top-level kernel launch with no surrounding function, i.e. a null caller.
+kernel<<<1, 1>>>();
----------------
AdityaSinha149 wrote:

HIP is not currently supported in incremental mode so we can't use clang-repl 
to test. This PR is one of the changes required to enable it.

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

Reply via email to