Skip to content

Commit db357d9

Browse files
committed
Sema: Remove unused 'locator' parameter in a few places
1 parent a924928 commit db357d9

File tree

1 file changed

+10
-16
lines changed

1 file changed

+10
-16
lines changed

lib/Sema/CSApply.cpp

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -303,12 +303,10 @@ namespace {
303303
///
304304
/// \param expr The expression to be coerced.
305305
/// \param toType The type to which the expression will be coerced.
306-
/// \param locator Locator describing where this conversion occurs.
307306
///
308307
/// \return The coerced expression, whose type will be equivalent to
309308
/// \c toType.
310-
Expr *coerceSuperclass(Expr *expr, Type toType,
311-
ConstraintLocatorBuilder locator);
309+
Expr *coerceSuperclass(Expr *expr, Type toType);
312310

313311
/// Coerce the given value to existential type.
314312
///
@@ -320,12 +318,10 @@ namespace {
320318
///
321319
/// \param expr The expression to be coerced.
322320
/// \param toType The type to which the expression will be coerced.
323-
/// \param locator Locator describing where this conversion occurs.
324321
///
325322
/// \return The coerced expression, whose type will be equivalent to
326323
/// \c toType.
327-
Expr *coerceExistential(Expr *expr, Type toType,
328-
ConstraintLocatorBuilder locator);
324+
Expr *coerceExistential(Expr *expr, Type toType);
329325

330326
/// Coerce an expression of (possibly unchecked) optional
331327
/// type to have a different (possibly unchecked) optional type.
@@ -4754,8 +4750,7 @@ static Type getMetatypeSuperclass(Type t) {
47544750
return t->getSuperclass();
47554751
}
47564752

4757-
Expr *ExprRewriter::coerceSuperclass(Expr *expr, Type toType,
4758-
ConstraintLocatorBuilder locator) {
4753+
Expr *ExprRewriter::coerceSuperclass(Expr *expr, Type toType) {
47594754
auto &ctx = cs.getASTContext();
47604755

47614756
auto fromType = cs.getType(expr);
@@ -4780,7 +4775,7 @@ Expr *ExprRewriter::coerceSuperclass(Expr *expr, Type toType,
47804775
new (ctx) ArchetypeToSuperExpr(expr, superclass));
47814776

47824777
if (!superclass->isEqual(toType))
4783-
return coerceSuperclass(expr, toType, locator);
4778+
return coerceSuperclass(expr, toType);
47844779

47854780
return expr;
47864781

@@ -4794,7 +4789,7 @@ Expr *ExprRewriter::coerceSuperclass(Expr *expr, Type toType,
47944789
auto *archetypeVal = cs.cacheType(new (ctx) OpaqueValueExpr(
47954790
expr->getSourceRange(), fromArchetype));
47964791

4797-
auto *result = coerceSuperclass(archetypeVal, toType, locator);
4792+
auto *result = coerceSuperclass(archetypeVal, toType);
47984793

47994794
return cs.cacheType(
48004795
new (ctx) OpenExistentialExpr(expr, archetypeVal, result,
@@ -4830,8 +4825,7 @@ collectExistentialConformances(Type fromType, Type toType,
48304825
return toType->getASTContext().AllocateCopy(conformances);
48314826
}
48324827

4833-
Expr *ExprRewriter::coerceExistential(Expr *expr, Type toType,
4834-
ConstraintLocatorBuilder locator) {
4828+
Expr *ExprRewriter::coerceExistential(Expr *expr, Type toType) {
48354829
Type fromType = cs.getType(expr);
48364830
Type fromInstanceType = fromType;
48374831
Type toInstanceType = toType;
@@ -5823,11 +5817,11 @@ Expr *ExprRewriter::coerceToType(Expr *expr, Type toType,
58235817

58245818
case ConversionRestrictionKind::Superclass:
58255819
case ConversionRestrictionKind::ExistentialMetatypeToMetatype:
5826-
return coerceSuperclass(expr, toType, locator);
5820+
return coerceSuperclass(expr, toType);
58275821

58285822
case ConversionRestrictionKind::Existential:
58295823
case ConversionRestrictionKind::MetatypeToExistentialMetatype:
5830-
return coerceExistential(expr, toType, locator);
5824+
return coerceExistential(expr, toType);
58315825

58325826
case ConversionRestrictionKind::ClassMetatypeToAnyObject: {
58335827
assert(ctx.LangOpts.EnableObjCInterop &&
@@ -6060,7 +6054,7 @@ Expr *ExprRewriter::coerceToType(Expr *expr, Type toType,
60606054
fromSuperClass;
60616055
fromSuperClass = fromSuperClass->getSuperclass()) {
60626056
if (fromSuperClass->isEqual(toType)) {
6063-
return coerceSuperclass(expr, toType, locator);
6057+
return coerceSuperclass(expr, toType);
60646058
}
60656059
}
60666060
break;
@@ -6193,7 +6187,7 @@ Expr *ExprRewriter::coerceToType(Expr *expr, Type toType,
61936187
case TypeKind::ExistentialMetatype:
61946188
case TypeKind::ProtocolComposition:
61956189
case TypeKind::Protocol:
6196-
return coerceExistential(expr, toType, locator);
6190+
return coerceExistential(expr, toType);
61976191

61986192
// Coercion to Optional<T>.
61996193
case TypeKind::BoundGenericEnum: {

0 commit comments

Comments
 (0)