================ @@ -7670,27 +7739,68 @@ static FloatingRank getFloatingRank(QualType T) { } } +/// C++23 6.8.5 [conv.rank] /// getFloatingTypeOrder - Compare the rank of the two specified floating /// point types, ignoring the domain of the type (i.e. 'double' == -/// '_Complex double'). If LHS > RHS, return 1. If LHS == RHS, return 0. If -/// LHS < RHS, return -1. -int ASTContext::getFloatingTypeOrder(QualType LHS, QualType RHS) const { +/// '_Complex double'). +/// If LHS > RHS, return FRCR_Greater. If LHS == RHS, return FRCR_Equal. If +/// LHS < RHS, return FRCR_Lesser. If the values representable by the two +/// are not subset of each other, return FRCR_Unordered. If LHS == RHS but +/// LHS has a higher subrank than RHS return FRCR_Equal_Greater_Subrank else +/// return FRCR_Equal_Lesser_Subrank. +FloatConvRankCompareResult +ASTContext::getFloatingTypeOrder(QualType LHS, QualType RHS) const { + if (LHS->isCXX23FloatingPointType(*this) && ---------------- jcranmer-intel wrote:
I think it's worth explicitly calling out in a comment here that C and C++ have different rules for the extended floating-point types. https://github.com/llvm/llvm-project/pull/78503 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits