Skip to content

Commit c7169ed

Browse files
committed
[CSBindings] NFC: Drop result type from since it's no longer useful
1 parent b004dce commit c7169ed

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

include/swift/Sema/CSBindings.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -413,11 +413,7 @@ struct PotentialBindings {
413413

414414
/// Add a potential binding to the list of bindings,
415415
/// coalescing supertype bounds when we are able to compute the meet.
416-
///
417-
/// \returns true if this binding has been added to the set,
418-
/// false otherwise (e.g. because binding with this type is
419-
/// already in the set).
420-
bool addPotentialBinding(PotentialBinding binding, bool allowJoinMeet = true);
416+
void addPotentialBinding(PotentialBinding binding, bool allowJoinMeet = true);
421417

422418
/// Check if this binding is viable for inclusion in the set.
423419
bool isViable(PotentialBinding &binding) const;

lib/Sema/CSBindings.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -608,12 +608,12 @@ PotentialBindings::isLiteralCoveredBy(const LiteralRequirement &literal,
608608
} while (true);
609609
}
610610

611-
bool PotentialBindings::addPotentialBinding(PotentialBinding binding,
611+
void PotentialBindings::addPotentialBinding(PotentialBinding binding,
612612
bool allowJoinMeet) {
613613
assert(!binding.BindingType->is<ErrorType>());
614614

615615
if (Bindings.count(binding))
616-
return false;
616+
return;
617617

618618
// If this is a non-defaulted supertype binding,
619619
// check whether we can combine it with another
@@ -652,7 +652,7 @@ bool PotentialBindings::addPotentialBinding(PotentialBinding binding,
652652
// If new binding has been joined with at least one of existing
653653
// bindings, there is no reason to include it into the set.
654654
if (!joined.empty())
655-
return false;
655+
return;
656656
}
657657

658658
// If the type variable can't bind to an lvalue, make sure the
@@ -663,7 +663,7 @@ bool PotentialBindings::addPotentialBinding(PotentialBinding binding,
663663
}
664664

665665
if (!isViable(binding))
666-
return false;
666+
return;
667667

668668
// Check whether the given binding covers any of the literal protocols
669669
// associated with this type variable.
@@ -698,7 +698,7 @@ bool PotentialBindings::addPotentialBinding(PotentialBinding binding,
698698
}
699699
}
700700

701-
return Bindings.insert(std::move(binding));
701+
Bindings.insert(std::move(binding));
702702
}
703703

704704
void PotentialBindings::addLiteral(Constraint *constraint) {

0 commit comments

Comments
 (0)