diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:06:01 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:06:01 +0000 |
| commit | 486754660bb926339aefcf012a3f848592babb8b (patch) | |
| tree | ecdbc446c9876f4f120f701c243373cd3cb43db3 /test/SemaOpenCL/predefined-expr.cl | |
| parent | 55e6d896ad333f07bb3b1ba487df214fc268a4ab (diff) | |
Notes
Diffstat (limited to 'test/SemaOpenCL/predefined-expr.cl')
| -rw-r--r-- | test/SemaOpenCL/predefined-expr.cl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/SemaOpenCL/predefined-expr.cl b/test/SemaOpenCL/predefined-expr.cl new file mode 100644 index 000000000000..419e7a925c5c --- /dev/null +++ b/test/SemaOpenCL/predefined-expr.cl @@ -0,0 +1,8 @@ +// RUN: %clang_cc1 %s -verify +// RUN: %clang_cc1 %s -verify -cl-std=CL2.0 + +void f() { + char *f1 = __func__; //expected-error-re{{initializing '{{__generic char|char}} *' with an expression of type 'const __constant char *' changes address space of pointer}} + constant char *f2 = __func__; //expected-warning{{initializing '__constant char *' with an expression of type 'const __constant char [2]' discards qualifiers}} + constant const char *f3 = __func__; +} |
