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
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}}
13 // expected-error
@-
6 {{attribute
'nosvm
' is supported in the OpenCL version
2.0 onwards
}}
16 __attribute__
((nosvm)) void g
(void); // expected-warning {{'nosvm' attribute only applies to variables}}
19 void f
(__attribute__((nosvm)) int
* a
); // expected-warning {{'nosvm' attribute ignored}}