]> granicus.if.org Git - clang/commit
[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)
commit342dd05bcbbc3a49e28aa176f31676c8740db89b
treeacf62d64dbdf449afacde3df3fd5e6c5078f302c
parent805d58dd43c1329590299f37ad2f48efbae3c78b
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@356888 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/TokenKinds.def
lib/Parse/ParseDecl.cpp
lib/Parse/ParseDeclCXX.cpp
lib/Parse/ParseTentative.cpp
test/Parser/opencl-cxx-keywords.cl