[CS] Add locator version of findSelectedOverloadFor

This commit is contained in:
Hamish Knight
2019-08-30 16:19:57 +01:00
parent a962f02024
commit b9ad96a944
3 changed files with 22 additions and 21 deletions

View File

@@ -144,13 +144,7 @@ protected:
/// by the constraint solver.
ResolvedOverloadSetListItem *
getResolvedOverload(ConstraintLocator *locator) const {
auto resolvedOverload = CS.getResolvedOverloadSets();
while (resolvedOverload) {
if (resolvedOverload->Locator == locator)
return resolvedOverload;
resolvedOverload = resolvedOverload->Previous;
}
return nullptr;
return CS.findSelectedOverloadFor(locator);
}
/// Retrive the constraint locator for the given anchor and