summaryrefslogtreecommitdiff
path: root/clang/test/PCH/cuda-kernel-call.cu
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/PCH/cuda-kernel-call.cu')
-rw-r--r--clang/test/PCH/cuda-kernel-call.cu25
1 files changed, 25 insertions, 0 deletions
diff --git a/clang/test/PCH/cuda-kernel-call.cu b/clang/test/PCH/cuda-kernel-call.cu
new file mode 100644
index 0000000..ef12c59
--- /dev/null
+++ b/clang/test/PCH/cuda-kernel-call.cu
@@ -0,0 +1,25 @@
+// RUN: %clang_cc1 -emit-pch -o %t %s
+// RUN: %clang_cc1 -include-pch %t -fsyntax-only %s
+
+#ifndef HEADER
+#define HEADER
+// Header.
+
+#include "../SemaCUDA/cuda.h"
+
+void kcall(void (*kp)()) {
+ kp<<<1, 1>>>();
+}
+
+__global__ void kern() {
+}
+
+#else
+// Using the header.
+
+void test() {
+ kcall(kern);
+ kern<<<1, 1>>>();
+}
+
+#endif