mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-09 10:55:03 +00:00
![Anastasia Stulova](/assets/img/avatar_default.png)
Diagnostics should note version dependent issues by giving a hint about current version being compiled for. This patch changes diagnostics of static storage class specifier and generic type qualifier to specify OpenCL version as well as converts other diagnostics to match the style. Patch by Vedran Miletic! Review: http://reviews.llvm.org/D19780 llvm-svn: 269305
27 lines
942 B
Common Lisp
27 lines
942 B
Common Lisp
// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only
|
|
// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -cl-std=CL2.0 -DCL20
|
|
|
|
#ifdef CL20
|
|
// expected-no-diagnostics
|
|
#endif
|
|
|
|
__generic int * __generic_test(__generic int *arg) {
|
|
__generic int *var;
|
|
return var;
|
|
}
|
|
#ifndef CL20
|
|
// expected-error@-5 {{OpenCL version 1.0 does not support the '__generic' type qualifier}}
|
|
// expected-error@-6 {{OpenCL version 1.0 does not support the '__generic' type qualifier}}
|
|
// expected-error@-6 {{OpenCL version 1.0 does not support the '__generic' type qualifier}}
|
|
#endif
|
|
|
|
generic int * generic_test(generic int *arg) {
|
|
generic int *var;
|
|
return var;
|
|
}
|
|
#ifndef CL20
|
|
// expected-error@-5 {{OpenCL version 1.0 does not support the 'generic' type qualifier}}
|
|
// expected-error@-6 {{OpenCL version 1.0 does not support the 'generic' type qualifier}}
|
|
// expected-error@-6 {{OpenCL version 1.0 does not support the 'generic' type qualifier}}
|
|
#endif
|