[RISCV][FMV] Support target_clones (#85786)
[llvm-project.git] / clang / test / SemaOpenCL / nosvm.cl
bloba29624d316ab78caef0f5b96a14d0c55486be014
1 // RUN: %clang_cc1 -verify %s
2 // RUN: %clang_cc1 -verify -cl-std=CL2.0 %s
3 // RUN: %clang_cc1 -verify -cl-std=clc++1.0 %s
4 // RUN: %clang_cc1 -verify -x c -D NOCL %s
6 #ifndef NOCL
7 kernel void f(__attribute__((nosvm)) global int* a);
8 #if (__OPENCL_C_VERSION__ == 200)
9 // expected-warning@-2 {{'nosvm' attribute is deprecated and ignored in OpenCL C version 2.0}}
10 #elif (__OPENCL_CPP_VERSION__ == 100)
11 // expected-warning@-4 {{'nosvm' attribute is deprecated and ignored in C++ for OpenCL version 1.0}}
12 #else
13 // expected-error@-6 {{attribute 'nosvm' is supported in the OpenCL version 2.0 onwards}}
14 #endif
16 __attribute__((nosvm)) void g(void); // expected-warning {{'nosvm' attribute only applies to variables}}
18 #else
19 void f(__attribute__((nosvm)) int* a); // expected-warning {{'nosvm' attribute ignored}}
20 #endif