rjmccall added inline comments.
================ Comment at: lib/Sema/SemaOverload.cpp:3150 + !getLangOpts().OpenCLCPlusPlus) + return false; + ---------------- yaxunl wrote: > rjmccall wrote: > > It's not really OpenCL C++ that's special here, it's the possibility of > > promotions between address spaces. > For OpenCL C++, there is language rule about address space promotion. > > For other languages, there is no generic rule about adderss space promotion, > since the meaning of address space and their relations are target dependent. > Do we want to introduce a target hook Target::canPromote(AddressSpace Src, > AddressSpace Dest, LanguageOptions LangOpts) to represent this? Or do we just > assume a simple rule, that is, all address space can be promoted to default > address space 0, otherwise it is not allowed? A target-specific hook for handling target-specific address spaces makes sense to me. I don't think there's a generic rule allowing promotion into the default AS. https://reviews.llvm.org/D49294 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits