This fixes the prioritization of address spaces when choosing a constructor,
stopping them from being considered equally good, which made the construction
of types that could be constructed by more than one of the constructors.
It does this by preferring the most specific address space, which is decided by seeing
if one of the address spaces is a superset of the other, and preferring the other.
Fixes: PR50329
I think we should remove the OpenCL check since it is not OpenCL specific rule and you are using common helpers indeed!
I also wonder if this should be applied to all member functions not only ctors since isBetterOverloadCandidate should be used for everything?
However it seems that other members are already handled somehow https://godbolt.org/z/MrWKPKed7. Do you know where this handling comes from?