@@ -1020,7 +1020,7 @@ namespace {
10201020 options);
10211021 SmallVector<OverloadChoice, 4 > outerChoices;
10221022 for (auto decl : outerAlternatives) {
1023- outerChoices.push_back (OverloadChoice ( Type (), decl, functionRefInfo));
1023+ outerChoices.push_back (OverloadChoice::getDecl ( decl, functionRefInfo));
10241024 }
10251025 CS.addValueMemberConstraint (
10261026 baseTy, name, tv, CurDC, functionRefInfo, outerChoices,
@@ -1044,8 +1044,8 @@ namespace {
10441044 auto tv = CS.createTypeVariable (memberLocator,
10451045 TVO_CanBindToLValue | TVO_CanBindToNoEscape);
10461046
1047- OverloadChoice choice =
1048- OverloadChoice (CS.getType (base), decl, functionRefInfo);
1047+ auto choice =
1048+ OverloadChoice::getDecl (CS.getType (base), decl, functionRefInfo);
10491049
10501050 auto locator = CS.getConstraintLocator (expr, ConstraintLocator::Member);
10511051 CS.addBindOverloadConstraint (tv, choice, locator, CurDC);
@@ -1162,7 +1162,7 @@ namespace {
11621162 // a known subscript here. This might be cleaner if we split off a new
11631163 // UnresolvedSubscriptExpr from SubscriptExpr.
11641164 if (auto decl = declOrNull) {
1165- OverloadChoice choice = OverloadChoice (
1165+ auto choice = OverloadChoice::getDecl (
11661166 baseTy, decl, FunctionRefInfo::doubleBaseNameApply ());
11671167 CS.addBindOverloadConstraint (memberTy, choice, memberLocator,
11681168 CurDC);
@@ -1657,8 +1657,8 @@ namespace {
16571657 // resolve it. This records the overload for use later.
16581658 auto tv = CS.createTypeVariable (locator, options);
16591659
1660- OverloadChoice choice =
1661- OverloadChoice ( Type (), E->getDecl (), E->getFunctionRefInfo ());
1660+ auto choice =
1661+ OverloadChoice::getDecl ( E->getDecl (), E->getFunctionRefInfo ());
16621662 CS.addBindOverloadConstraint (tv, choice, locator, CurDC);
16631663 return tv;
16641664 }
@@ -1775,8 +1775,8 @@ namespace {
17751775 if (decls[i]->isInvalid ())
17761776 continue ;
17771777
1778- OverloadChoice choice =
1779- OverloadChoice ( Type (), decls[i], expr->getFunctionRefInfo ());
1778+ auto choice =
1779+ OverloadChoice::getDecl ( decls[i], expr->getFunctionRefInfo ());
17801780 choices.push_back (choice);
17811781 }
17821782
@@ -4120,7 +4120,7 @@ namespace {
41204120 // logic.
41214121 if (result->isInvalid ())
41224122 continue ;
4123- OverloadChoice choice = OverloadChoice ( Type (), result, functionRefInfo);
4123+ auto choice = OverloadChoice::getDecl ( result, functionRefInfo);
41244124 choices.push_back (choice);
41254125 }
41264126
0 commit comments