mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[CodeCompletion] Store ignored arguments as Expr * instead of ConstraintLocators
This avoids the construction of `ConstraintLocator`s.
This commit is contained in:
@@ -12470,9 +12470,14 @@ bool ConstraintSystem::recordFix(ConstraintFix *fix, unsigned impact) {
|
||||
log << ")\n";
|
||||
}
|
||||
|
||||
if (isArgumentIgnoredForCodeCompletion(fix->getLocator())) {
|
||||
// The argument was ignored. Don't record any fixes for it.
|
||||
return false;
|
||||
if (hasArgumentsIgnoredForCodeCompletion()) {
|
||||
// Avoid simplifying the locator if the constraint system didn't ignore any
|
||||
// arguments.
|
||||
auto argExpr = simplifyLocatorToAnchor(fix->getLocator());
|
||||
if (isArgumentIgnoredForCodeCompletion(getAsExpr<Expr>(argExpr))) {
|
||||
// The argument was ignored. Don't record any fixes for it.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Record the fix.
|
||||
|
||||
Reference in New Issue
Block a user