rjmccall added a comment.

In https://reviews.llvm.org/D50278#1190544, @ebevhan wrote:

> I think the solution to a lot of diagnostic and behavior issues with address 
> spaces is to remove predication on OpenCL. It's a bit odd to have a language 
> feature that is enabled out of the box regardless of langoptions (address 
> spaces) but won't actually work properly unless you're building OpenCL.


I agree; almost all of the address-space-related restrictions predicated on 
OpenCL are actually general restrictions that apply across all address-space 
extensions.  OpenCL's rules only differ from what's laid out in TR 18037 in how 
certain declarations default to specific address spaces.  It's unfortunate that 
the code reviewers at the time (which probably included me at least a little) 
didn't try harder to push for the more general rule.  As it is, it would be a 
good project for someone who's working on address spaces a lot to just audit 
all the OpenCL-specific checks in Sema to see which of them should be 
generalized.


Repository:
  rC Clang

https://reviews.llvm.org/D50278



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

Reply via email to