Skip to content

Commit d63332f

Browse files
committed
[ConstraintSystem] Remove more uses of summaryFlags being set to 0
1 parent f76db4b commit d63332f

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

lib/Sema/CSDiagnostics.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,9 @@ Optional<SelectedOverload> FailureDiagnostic::getChoiceFor(Expr *expr) {
112112

113113
if (auto *AE = dyn_cast<ApplyExpr>(expr)) {
114114
if (auto *TE = dyn_cast<TypeExpr>(AE->getFn())) {
115-
locator = cs.getConstraintLocator(AE,
116-
{ConstraintLocator::ApplyFunction,
117-
ConstraintLocator::ConstructorMember},
118-
/*summaryFlags=*/0);
115+
locator =
116+
getConstraintLocator(AE, {ConstraintLocator::ApplyFunction,
117+
ConstraintLocator::ConstructorMember});
119118
}
120119
return getChoiceFor(AE->getFn());
121120
} else if (auto *UDE = dyn_cast<UnresolvedDotExpr>(expr)) {
@@ -586,10 +585,9 @@ Type NoEscapeFuncToTypeConversionFailure::getParameterTypeFor(
586585
locator =
587586
cs.getConstraintLocator(fnExpr, ConstraintLocator::UnresolvedMember);
588587
} else if (auto *TE = dyn_cast<TypeExpr>(fnExpr)) {
589-
locator = cs.getConstraintLocator(call,
590-
{ConstraintLocator::ApplyFunction,
591-
ConstraintLocator::ConstructorMember},
592-
/*summaryFlags=*/0);
588+
locator =
589+
getConstraintLocator(call, {ConstraintLocator::ApplyFunction,
590+
ConstraintLocator::ConstructorMember});
593591
} else {
594592
locator = cs.getConstraintLocator(fnExpr);
595593
}

lib/Sema/CSSimplify.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3437,8 +3437,7 @@ ConstraintSystem::SolutionKind ConstraintSystem::simplifyConformsToConstraint(
34373437
auto reqPath = ArrayRef<LocatorPathElt>(path).drop_back();
34383438
// Underlying conformance requirement is itself fixed,
34393439
// this wouldn't lead to a right solution.
3440-
if (hasFixFor(getConstraintLocator(anchor, reqPath,
3441-
/*summaryFlags=*/0)))
3440+
if (hasFixFor(getConstraintLocator(anchor, reqPath)))
34423441
return SolutionKind::Error;
34433442
}
34443443

lib/Sema/ConstraintSystem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1892,7 +1892,7 @@ class ConstraintSystem {
18921892
/// path, uniqued and automatically infer the summary flags
18931893
ConstraintLocator *
18941894
getConstraintLocator(Expr *anchor,
1895-
ArrayRef<ConstraintLocator::PathElement> path);
1895+
ArrayRef<ConstraintLocator::PathElement> path) const;
18961896

18971897
/// Retrieve the constraint locator for the given anchor and
18981898
/// an empty path, uniqued.

0 commit comments

Comments
 (0)