28 lines · plain
1// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fsyntax-only -verify %s2// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -fsyntax-only -fcuda-is-device -verify %s3 4// expected-no-diagnostics5 6#include "Inputs/cuda.h"7 8void foo();9__device__ void foo();10 11template<class F>12void host_temp(F f);13 14template<class F>15__device__ void device_temp(F f);16 17void host_caller() {18 host_temp(foo);19}20 21__global__ void kernel_caller() {22 device_temp(foo);23}24 25__device__ void device_caller() {26 device_temp(foo);27}28