1// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only 2// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -cl-std=CL2.0 -DCL20 3 4#ifdef CL20 5// expected-no-diagnostics 6#endif 7 8__generic int * __generic_test(__generic int *arg) { 9 __generic int *var; 10 return var; 11} 12#ifndef CL20 13// expected-error@-5 {{OpenCL does not support the '__generic' type qualifier}} 14// expected-error@-6 {{OpenCL does not support the '__generic' type qualifier}} 15// expected-error@-6 {{OpenCL does not support the '__generic' type qualifier}} 16#endif 17 18generic int * generic_test(generic int *arg) { 19 generic int *var; 20 return var; 21} 22#ifndef CL20 23// expected-error@-5 {{OpenCL does not support the 'generic' type qualifier}} 24// expected-error@-6 {{OpenCL does not support the 'generic' type qualifier}} 25// expected-error@-6 {{OpenCL does not support the 'generic' type qualifier}} 26#endif 27