xref: /llvm-project/clang/test/SemaCUDA/template-arg-deduction.cu (revision ea72a4e6547feaa82e132746c6777b3b69aed0d5)
1 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fsyntax-only -verify %s
2 // RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -fsyntax-only -fcuda-is-device -verify %s
3 
4 // expected-no-diagnostics
5 
6 #include "Inputs/cuda.h"
7 
8 void foo();
9 __device__ void foo();
10 
11 template<class F>
12 void host_temp(F f);
13 
14 template<class F>
15 __device__ void device_temp(F f);
16 
host_caller()17 void host_caller() {
18   host_temp(foo);
19 }
20 
kernel_caller()21 __global__ void kernel_caller() {
22   device_temp(foo);
23 }
24 
device_caller()25 __device__ void device_caller() {
26   device_temp(foo);
27 }
28