brintos

brintos / llvm-project-archived public Read only

0
0
Text · 672 B · f5da873 Raw
17 lines · cpp
1// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -fsyntax-only -verify %s2// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda- -fsyntax-only -verify %s3// RUN: %clang_cc1 -triple spir64 -fsyntax-only -verify %s4// RUN: %clang_cc1 -triple spirv64 -fsyntax-only -verify %s5 6[[clang::device_kernel]] void kernel1() {}7 8namespace {9[[clang::device_kernel]] void kernel2() {} // expected-error {{'kernel2' is specified as a device kernel but it is not externally visible}}10}11 12namespace 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}}17