1 // RUN
: %clang_cc1 %s -verify -pedantic -fsyntax-only
2 // RUN
: %clang_cc1 %s -verify -pedantic -fsyntax-only -cl-std
=CL2.0
4 #if __OPENCL_C_VERSION__
== CL_VERSION_2_0
5 // expected-no-diagnostics
8 __generic int
* __generic_test
(__generic int
*arg
) {
12 #if __OPENCL_C_VERSION__
!= CL_VERSION_2_0
13 // expected-error
@-
5 {{OpenCL C version
1.2 does not support the
'__generic
' type qualifier
}}
14 // expected-error
@-
6 {{OpenCL C version
1.2 does not support the
'__generic
' type qualifier
}}
15 // expected-error
@-
6 {{OpenCL C version
1.2 does not support the
'__generic
' type qualifier
}}
18 generic int
* generic_test
(generic int
*arg
) {
22 #if __OPENCL_C_VERSION__
!= CL_VERSION_2_0
23 // expected-error
@-
5 {{OpenCL C version
1.2 does not support the
'generic
' type qualifier
}}
24 // expected-error
@-
6 {{OpenCL C version
1.2 does not support the
'generic
' type qualifier
}}
25 // expected-error
@-
6 {{OpenCL C version
1.2 does not support the
'generic
' type qualifier
}}