xref: /llvm-project/clang/test/SemaCUDA/implicit-host-device-fun.cu (revision 9774d0ce5fbd70288514da77072313b4f45b34bb)
1 // RUN: %clang_cc1 -isystem %S/Inputs  -fsyntax-only %s
2 // RUN: %clang_cc1 -isystem %S/Inputs -fcuda-is-device  -fsyntax-only %s
3 // RUN: %clang_cc1 -isystem %S/Inputs -foffload-implicit-host-device-templates -fsyntax-only %s
4 // RUN: %clang_cc1 -isystem %S/Inputs -foffload-implicit-host-device-templates -fcuda-is-device  -fsyntax-only %s
5 
6 #include <cuda.h>
7 
8 template<typename T>
tempf(T x)9 void tempf(T x) {
10 }
11 
12 template<typename T>
tempf(T x)13 __device__ void tempf(T x) {
14 }
15 
host_fun()16 void host_fun() {
17   tempf(1);
18 }
19 
device_fun()20 __device__ void device_fun() {
21   tempf(1);
22 }
23