Skip to content

Commit 53794d3

Browse files
committed
Sema: Rename ConstraintSystem::generateConstraints() to ConstraintSystem::generateOverloadConstraints()
1 parent b44bff2 commit 53794d3

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

include/swift/Sema/ConstraintSystem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4642,7 +4642,7 @@ class ConstraintSystem {
46424642
/// \param getFix Optional callback to determine a fix for a given
46434643
/// choice (first argument is a position of current choice,
46444644
/// second - the choice in question).
4645-
void generateConstraints(
4645+
void generateOverloadConstraints(
46464646
SmallVectorImpl<Constraint *> &constraints, Type type,
46474647
ArrayRef<OverloadChoice> choices, DeclContext *useDC,
46484648
ConstraintLocator *locator,

lib/Sema/CSSimplify.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10834,7 +10834,7 @@ ConstraintSystem::SolutionKind ConstraintSystem::simplifyMemberConstraint(
1083410834
}
1083510835
}
1083610836

10837-
generateConstraints(
10837+
generateOverloadConstraints(
1083810838
candidates, memberTy, result.ViableCandidates, useDC, locator,
1083910839
result.getFavoredIndex(), /*requiresFix=*/false,
1084010840
[&](unsigned, const OverloadChoice &choice) {
@@ -10861,7 +10861,7 @@ ConstraintSystem::SolutionKind ConstraintSystem::simplifyMemberConstraint(
1086110861
allFromConditionalConformances(*this, baseTy,
1086210862
result.ViableCandidates);
1086310863

10864-
generateConstraints(
10864+
generateOverloadConstraints(
1086510865
candidates, memberTy, outerAlternatives, useDC, locator, std::nullopt,
1086610866
/*requiresFix=*/!treatAsViable,
1086710867
[&](unsigned, const OverloadChoice &) {
@@ -10875,7 +10875,7 @@ ConstraintSystem::SolutionKind ConstraintSystem::simplifyMemberConstraint(
1087510875
if (!result.UnviableCandidates.empty()) {
1087610876
// Generate constraints for unavailable choices if they have a fix,
1087710877
// and disable them by default, they'd get picked up in the "salvage" mode.
10878-
generateConstraints(
10878+
generateOverloadConstraints(
1087910879
candidates, memberTy, result.UnviableCandidates, useDC, locator,
1088010880
/*favoredChoice=*/std::nullopt, /*requiresFix=*/true,
1088110881
[&](unsigned idx, const OverloadChoice &choice) {

lib/Sema/ConstraintSystem.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,8 +1189,8 @@ void ConstraintSystem::addOverloadSet(Type boundType,
11891189
}
11901190

11911191
SmallVector<Constraint *, 4> candidates;
1192-
generateConstraints(candidates, boundType, choices, useDC, locator,
1193-
favoredIndex);
1192+
generateOverloadConstraints(candidates, boundType, choices, useDC, locator,
1193+
favoredIndex);
11941194
// For an overload set (disjunction) from newly generated candidates.
11951195
addOverloadSet(candidates, locator);
11961196
}
@@ -3815,7 +3815,7 @@ Type constraints::isRawRepresentable(ConstraintSystem &cs, Type type) {
38153815
return conformance.getTypeWitnessByName(type, cs.getASTContext().Id_RawValue);
38163816
}
38173817

3818-
void ConstraintSystem::generateConstraints(
3818+
void ConstraintSystem::generateOverloadConstraints(
38193819
SmallVectorImpl<Constraint *> &constraints, Type type,
38203820
ArrayRef<OverloadChoice> choices, DeclContext *useDC,
38213821
ConstraintLocator *locator, std::optional<unsigned> favoredIndex,

0 commit comments

Comments
 (0)