Skip to content

Commit 12cf13d

Browse files
committed
Remove dead code related to tracking favored constraints.
At one point this was added in order to inhibit some bridging conversions while we are handling favored constraints, but that code has been removed now, making this dead. Noticed by inspection.
1 parent 3fc5aef commit 12cf13d

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

lib/Sema/CSSolver.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2277,13 +2277,6 @@ bool ConstraintSystem::solveSimplified(
22772277
DisjunctionChoices.push_back({locator, index});
22782278
}
22792279

2280-
// Determine whether we're handling a favored constraint in subsystem.
2281-
const bool willBeHandlingFavoredConstraint
2282-
= constraint->isFavored() || HandlingFavoredConstraint;
2283-
llvm::SaveAndRestore<bool> handlingFavoredConstraint(
2284-
HandlingFavoredConstraint,
2285-
willBeHandlingFavoredConstraint);
2286-
22872280
// Simplify this term in the disjunction.
22882281
switch (simplifyConstraint(*constraint)) {
22892282
case SolutionKind::Error:

lib/Sema/ConstraintSystem.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -893,10 +893,6 @@ class ConstraintSystem {
893893
/// solution it represents.
894894
Score CurrentScore;
895895

896-
/// Whether this constraint system is processing a favored
897-
/// constraint.
898-
bool HandlingFavoredConstraint = false;
899-
900896
SmallVector<TypeVariableType *, 16> TypeVariables;
901897

902898
/// Maps expressions to types for choosing a favored overload

0 commit comments

Comments
 (0)