Anastasia marked an inline comment as done. Anastasia added inline comments.
================ Comment at: lib/Sema/SemaOverload.cpp:9279 + (CandAS1 != LangAS::opencl_generic && CandAS1 != LangAS::Default)) + return true; + } ---------------- rjmccall wrote: > rjmccall wrote: > > This at least needs a comment explaining the rule you're trying to > > implement. > Okay, thanks for the clarification. I think this should just be part of > `CompareImplicitConversionSequence`, right? It seems to me that you should > prefer e.g. `int __private *` -> `int __private *` over `int __generic *` as > a normal argument conversion as well. > > Also, can this be written in terms of `isAddressSpaceSupersetOf`? I don't > remember how `LangAS::Default` works in OpenCL C++ enough to understand how > it fits in here. That's correct we should implement the same logic for the arguments too. I will create a helper function or do you think we should just call `CompareImplicitConversionSequence` on the method type too? I think `isAddressSpaceSupersetOf` can't be used here because it determines compatibility of address spaces. However, the logic we are expressing is for the address space preference instead. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55850/new/ https://reviews.llvm.org/D55850 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits