brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 7cd9bad Raw
20 lines · plain
1// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fsyntax-only \2// RUN:   -isystem %S/Inputs -verify %s3// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -fsyntax-only \4// RUN:   -isystem %S/Inputs -fcuda-is-device -verify %s5// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fsyntax-only \6// RUN:   -isystem %S/Inputs -verify=redecl -Wnvcc-compat %s7// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -fsyntax-only \8// RUN:   -isystem %S/Inputs -fcuda-is-device -Wnvcc-compat -verify=redecl %s9 10// expected-no-diagnostics11#include "cuda.h"12 13__device__ void f(); // redecl-note {{previous declaration is here}}14 15void f() {} // redecl-warning {{target-attribute based function overloads are not supported by NVCC and will be treated as a function redeclaration:new declaration is __host__ function, old declaration is __device__ function}}16 17void g(); // redecl-note {{previous declaration is here}}18 19__device__ void g() {} // redecl-warning {{target-attribute based function overloads are not supported by NVCC and will be treated as a function redeclaration:new declaration is __device__ function, old declaration is __host__ function}}20