@@ -1020,7 +1020,7 @@ namespace {
1020
1020
options);
1021
1021
SmallVector<OverloadChoice, 4 > outerChoices;
1022
1022
for (auto decl : outerAlternatives) {
1023
- outerChoices.push_back (OverloadChoice ( Type (), decl, functionRefInfo));
1023
+ outerChoices.push_back (OverloadChoice::getDecl ( decl, functionRefInfo));
1024
1024
}
1025
1025
CS.addValueMemberConstraint (
1026
1026
baseTy, name, tv, CurDC, functionRefInfo, outerChoices,
@@ -1044,8 +1044,8 @@ namespace {
1044
1044
auto tv = CS.createTypeVariable (memberLocator,
1045
1045
TVO_CanBindToLValue | TVO_CanBindToNoEscape);
1046
1046
1047
- OverloadChoice choice =
1048
- OverloadChoice (CS.getType (base), decl, functionRefInfo);
1047
+ auto choice =
1048
+ OverloadChoice::getDecl (CS.getType (base), decl, functionRefInfo);
1049
1049
1050
1050
auto locator = CS.getConstraintLocator (expr, ConstraintLocator::Member);
1051
1051
CS.addBindOverloadConstraint (tv, choice, locator, CurDC);
@@ -1162,7 +1162,7 @@ namespace {
1162
1162
// a known subscript here. This might be cleaner if we split off a new
1163
1163
// UnresolvedSubscriptExpr from SubscriptExpr.
1164
1164
if (auto decl = declOrNull) {
1165
- OverloadChoice choice = OverloadChoice (
1165
+ auto choice = OverloadChoice::getDecl (
1166
1166
baseTy, decl, FunctionRefInfo::doubleBaseNameApply ());
1167
1167
CS.addBindOverloadConstraint (memberTy, choice, memberLocator,
1168
1168
CurDC);
@@ -1657,8 +1657,8 @@ namespace {
1657
1657
// resolve it. This records the overload for use later.
1658
1658
auto tv = CS.createTypeVariable (locator, options);
1659
1659
1660
- OverloadChoice choice =
1661
- OverloadChoice ( Type (), E->getDecl (), E->getFunctionRefInfo ());
1660
+ auto choice =
1661
+ OverloadChoice::getDecl ( E->getDecl (), E->getFunctionRefInfo ());
1662
1662
CS.addBindOverloadConstraint (tv, choice, locator, CurDC);
1663
1663
return tv;
1664
1664
}
@@ -1775,8 +1775,8 @@ namespace {
1775
1775
if (decls[i]->isInvalid ())
1776
1776
continue ;
1777
1777
1778
- OverloadChoice choice =
1779
- OverloadChoice ( Type (), decls[i], expr->getFunctionRefInfo ());
1778
+ auto choice =
1779
+ OverloadChoice::getDecl ( decls[i], expr->getFunctionRefInfo ());
1780
1780
choices.push_back (choice);
1781
1781
}
1782
1782
@@ -4120,7 +4120,7 @@ namespace {
4120
4120
// logic.
4121
4121
if (result->isInvalid ())
4122
4122
continue ;
4123
- OverloadChoice choice = OverloadChoice ( Type (), result, functionRefInfo);
4123
+ auto choice = OverloadChoice::getDecl ( result, functionRefInfo);
4124
4124
choices.push_back (choice);
4125
4125
}
4126
4126
0 commit comments