llvm-project/clang/test/SemaOpenCL/predefined-expr.cl
Anastasia Stulova 869d17d851 [OpenCL] Pretty print __private addr space
Add printing of __private address space to TypePrinter to allow
it appears in diagnostics and AST dumps as all other language
addr spaces.

Tags: #clang

Differential Revision: https://reviews.llvm.org/D71272
2019-12-27 13:42:07 +00:00

9 lines
493 B
Common Lisp

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