Anastasia added a comment.

In D55850#1369008 <https://reviews.llvm.org/D55850#1369008>, @ebevhan wrote:

> I think the code that comes to mind is mostly like in 
> `GetTypeSourceInfoForDeclarator`:
>
>   LangAS AS =
>       (ASIdx == LangAS::Default ? LangAS::opencl_generic : ASIdx);
>   
>
> It's behind an OpenCLCPlusPlus guard so it won't add generic on anything if 
> it's not OpenCL++, but there shouldn't be a reason why the rest of the code 
> in that block won't work for regular C++.
>
> In fact, in most regular C++ this would be an issue, since Default typically 
> _is_ the 'generic' address space there.


Yes, `opencl_generic` is something quite specific to OpenCL I feel. I am not 
sure we can generalize it to C++.  I would quite like to understand this 
better. However, I think we could potentially implement `opencl_generic` using 
`Default` if only earlier OpenCL implementations wouldn't use `Default` for 
`opencl_private`. And because everything was built on top of this assumption 
it's now a big and a scary refactoring change to make. However, I think we can 
align different language modes better if `opencl_generic` could be implemented 
as `Default`. I might look into this at some point.


Repository:
  rC Clang

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

https://reviews.llvm.org/D55850



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to