[OpenCL] Add constant address space to __func__ in AST.
authorAnastasia Stulova <anastasia.stulova@arm.com>
Wed, 9 May 2018 13:23:26 +0000 (13:23 +0000)
committerAnastasia Stulova <anastasia.stulova@arm.com>
Wed, 9 May 2018 13:23:26 +0000 (13:23 +0000)
commit59055b94afbfe57a0cdcc230e7d066c275a03619
tree592453c195c224a16f0275f5e3aa011ca1b2d4ca
parentd20289b31a66596716afd8a9a933b698ff17bc55
[OpenCL] Add constant address space to __func__ in AST.

Added string literal helper function to obtain the type
attributed by a constant address space.

Also fixed predefind __func__ expr to use the helper
to constract the string literal correctly.

Differential Revision: https://reviews.llvm.org/D46049

llvm-svn: 331877
clang/include/clang/AST/ASTContext.h
clang/lib/AST/ASTContext.cpp
clang/lib/AST/Expr.cpp
clang/lib/Sema/SemaExpr.cpp
clang/test/CodeGenOpenCL/str_literals.cl
clang/test/SemaOpenCL/predefined-expr.cl [new file with mode: 0644]