predefined-expr.cl 470 B

12345678
  1. // RUN: %clang_cc1 %s -verify
  2. // RUN: %clang_cc1 %s -verify -cl-std=CL2.0
  3. void f() {
  4. char *f1 = __func__; //expected-error-re{{initializing '{{__generic char|char}} *' with an expression of type 'const __constant char *' changes address space of pointer}}
  5. constant char *f2 = __func__; //expected-warning{{initializing '__constant char *' with an expression of type 'const __constant char [2]' discards qualifiers}}
  6. constant const char *f3 = __func__;
  7. }