[PATCH] D71005: [AST] Enable expression of OpenCL language address spaces an attribute

Alexey Bader via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 5 05:07:35 PST 2019


bader marked an inline comment as done.
bader added inline comments.


================
Comment at: clang/include/clang/Basic/Attr.td:1123
 def OpenCLPrivateAddressSpace : TypeAttr {
-  let Spellings = [Keyword<"__private">, Keyword<"private">];
+  let Spellings = [Keyword<"__private">, Keyword<"private">, Clang<"opencl_private">];
   let Documentation = [OpenCLAddressSpacePrivateDocs];
----------------
aaron.ballman wrote:
> This looks like we're adding two levels of namespace -- is there a reason this should be `clang::opencl_private` as opposed to `opencl::private`? Is there something clang-specific to these?
> is there a reason this should be clang::opencl_private as opposed to opencl::private?

I'm okay with [[opencl::private]] as well. I have only one problem - currently OpenCL address spaces are exposed as keywords and using them in C++ breaks valid C++ code.

> Is there something clang-specific to these?

I guess no (except that it's implemented in only Clang :-) ).

@aaron.ballman, I already committed this version, sorry about that. I'll open another review with attribute renaming.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71005





More information about the cfe-commits mailing list