blob: 419e7a925c5c8936c403f9d95aeca849136c3a6f [file] [log] [blame]
Anastasia Stulova59055b92018-05-09 13:23:26 +00001// RUN: %clang_cc1 %s -verify
2// RUN: %clang_cc1 %s -verify -cl-std=CL2.0
3
4void f() {
5 char *f1 = __func__; //expected-error-re{{initializing '{{__generic char|char}} *' with an expression of type 'const __constant char *' changes address space of pointer}}
6 constant char *f2 = __func__; //expected-warning{{initializing '__constant char *' with an expression of type 'const __constant char [2]' discards qualifiers}}
7 constant const char *f3 = __func__;
8}