Anastasia Stulova | 59055b9 | 2018-05-09 13:23:26 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -verify |
| 2 | // RUN: %clang_cc1 %s -verify -cl-std=CL2.0 |
| 3 | |
| 4 | void f() { |
Anastasia Stulova | 869d17d | 2019-12-27 13:38:48 +0000 | [diff] [blame] | 5 | char *f1 = __func__; //expected-error-re{{initializing '{{__generic|__private}} char *__private' with an expression of type 'const __constant char *' changes address space of pointer}} |
| 6 | constant char *f2 = __func__; //expected-warning{{initializing '__constant char *__private' with an expression of type 'const __constant char [2]' discards qualifiers}} |
Anastasia Stulova | 59055b9 | 2018-05-09 13:23:26 +0000 | [diff] [blame] | 7 | constant const char *f3 = __func__; |
| 8 | } |