I added a new rank to ImplicitConversionRank enum to resolve the function overload ambiguity with vector types. Rank of scalar types conversion is lower than vector splat. So, we can choose which function should we call. See test for more details.
- rL298366: [OpenCL] Added implicit conversion rank for overloading functions with vector…
rC298366: [OpenCL] Added implicit conversion rank for overloading functions with vector…
rGc217f37cb663: [OpenCL] Added implicit conversion rank for overloading functions with vector…
|4 ↗||(On Diff #91308)|
I am thinking could this be a CodeGen test instead and we could check that the right overload is selected based on mangled name?
I think in this case it would be good to unify with test/SemaOpenCL/overload_addrspace_resolution.cl which has similar purpose. Also I think CodeGenOpenCL would be a better place for it. :)
Yes, I think we can also rename it to something more generic like overload.cl.
It would also be nice to start every separate testing section with a comment. Like here could be: