Debian Codegraph @

clang/test/Sema/callingconv-devicekernel.cpp

raw
1 // RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -fsyntax-only -verify %s
2 // RUN: %clang_cc1 -triple nvptx64-nvidia-cuda- -fsyntax-only -verify %s
3 // RUN: %clang_cc1 -triple spir64 -fsyntax-only -verify %s
4 // RUN: %clang_cc1 -triple spirv64 -fsyntax-only -verify %s
5
6 [[clang::device_kernel]] void kernel1() {}
7
8 namespace {
9 [[clang::device_kernel]] void kernel2() {} // expected-error {{'kernel2' is specified as a device kernel but it is not externally visible}}
10 }
11
12 namespace ns {
13 [[clang::device_kernel]] void kernel3() {}
14 }
15
16 [[clang::device_kernel]] static void kernel4() {} // expected-error {{'kernel4' is specified as a device kernel but it is not externally visible}}