mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[CS] Allow getCalleeLocator to find key path component callees
In order to do this we need it to take a ConstraintLocator argument so we can tell which component we want the callee for. To make it clear that we're looking for a callee at the anchor, also rename the member to getAnchormostCalleeLocator.
This commit is contained in:
@@ -3023,6 +3023,8 @@ namespace {
|
||||
}
|
||||
|
||||
case KeyPathExpr::Component::Kind::TupleElement: {
|
||||
// Note: If implemented, the logic in `getAnchormostCalleeLocator`
|
||||
// will need updating to return the correct callee locator for this.
|
||||
llvm_unreachable("not implemented");
|
||||
break;
|
||||
}
|
||||
@@ -3256,7 +3258,9 @@ namespace {
|
||||
// Record the labels.
|
||||
if (!labelsArePermanent)
|
||||
info.Labels = CS.allocateCopy(info.Labels);
|
||||
CS.ArgumentInfos[CS.getArgumentInfoLocator(expr)] = info;
|
||||
|
||||
auto *locator = CS.getConstraintLocator(expr);
|
||||
CS.ArgumentInfos[CS.getArgumentInfoLocator(locator)] = info;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user