[PATCH] D68388: [PR41008][OpenCL] Support restrict keyword in C++ mode

Kévin Petit via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 4 03:55:52 PDT 2019


kpet added a comment.

Something I should probably have explained in the commit message is that the functionality provided by `restrict` is already present in C++, where it is already exposed using different keywords. If you look at `clang/include/clang/Basic/TokenKinds.def`, there are `__restrict__` and `__restrict` aliases that end up producing `tok::kw_restrict`. The only thing this patch does is enabling the `restrict` keyword in C++ for OpenCL for compatibility with OpenCL C (see more on that on the bug). I don't expect any special handling will be required since the functionality is already supported both in C++ and OpenCL C.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68388/new/

https://reviews.llvm.org/D68388





More information about the cfe-commits mailing list