[CSOptimizer] Don't consider disabled overloads when checking whether disjunction is supported

Non-operator disjunctions are supported only if all of their _active_
choices are concrete.
This commit is contained in:
Pavel Yaskevich
2025-01-27 11:56:57 -08:00
parent 109e2081b6
commit 6bc23b5057

View File

@@ -125,6 +125,9 @@ static bool isSupportedDisjunction(Constraint *disjunction) {
// Non-operator disjunctions are supported only if they don't
// have any generic choices.
return llvm::all_of(choices, [&](Constraint *choice) {
if (choice->isDisabled())
return true;
if (choice->getKind() != ConstraintKind::BindOverload)
return false;