[PATCH] D59603: [PR40707][PR41011][OpenCL] Allow addr space spelling without double underscore in C++ mode

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 20 10:10:41 PDT 2019


Anastasia created this revision.
Anastasia added reviewers: svenvh, rjmccall.
Herald added subscribers: jdoerfert, ebevhan, yaxunl.

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

Note that in order to accept `private` correctly parsing has been changed to understand two different use cases - access specifier vs address space.

This fixes the issues reported in the bugs.

The header from libclc is compiled successfully.


https://reviews.llvm.org/D59603

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59603.191521.patch
Type: text/x-patch
Size: 5390 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190320/78043b5a/attachment-0001.bin>


More information about the cfe-commits mailing list