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.
Details
Details
- Reviewers
Anastasia cfe-commits - Commits
- rGc217f37cb663: [OpenCL] Added implicit conversion rank for overloading functions with vector…
rC298366: [OpenCL] Added implicit conversion rank for overloading functions with vector…
rL298366: [OpenCL] Added implicit conversion rank for overloading functions with vector…
Diff Detail
Diff Detail
Event Timeline
test/SemaOpenCL/overload-scalar-widening.cl | ||
---|---|---|
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. :) |
test/SemaOpenCL/overload_addrspace_resolution.cl | ||
---|---|---|
1 | Egor, I think you forgot to move the test to CodeGenOpenCL directory. |
test/SemaOpenCL/overload_addrspace_resolution.cl | ||
---|---|---|
1 | 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:
|
Egor, I think you forgot to move the test to CodeGenOpenCL directory.