[OpenCL] Allow addr space spelling without __ prefix in C++.
authorAnastasia Stulova <anastasia.stulova@arm.com>
Mon, 25 Mar 2019 11:54:02 +0000 (11:54 +0000)
committerAnastasia Stulova <anastasia.stulova@arm.com>
Mon, 25 Mar 2019 11:54:02 +0000 (11:54 +0000)
commit948e37c8ca8b4a4b72b0745c643fee1e4482c2d0
treed895d88a8196d01310633ffda2ed3d7a325b6c59
parent62590fee899065319c2d496633e780439c3707da
[OpenCL] Allow addr space spelling without __ prefix in C++.

For backwards compatibility we allow alternative spelling of address
spaces - 'private', 'local', 'global', 'constant', 'generic'.

In order to accept 'private' correctly, parsing has been changed to
understand different use cases - access specifier vs address space.

Fixes PR40707 and PR41011!

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

llvm-svn: 356888
clang/include/clang/Basic/TokenKinds.def
clang/lib/Parse/ParseDecl.cpp
clang/lib/Parse/ParseDeclCXX.cpp
clang/lib/Parse/ParseTentative.cpp
clang/test/Parser/opencl-cxx-keywords.cl