[CSOptimizer] Don't attempt to optimize calls with code completion token(s) in argument position

This commit is contained in:
Pavel Yaskevich
2023-02-15 11:56:33 -08:00
parent bc5f70a9a3
commit 14e2a16fce

View File

@@ -112,6 +112,10 @@ static void determineBestChoicesInContext(
auto argFuncType =
applicableFn.get()->getFirstType()->getAs<FunctionType>();
auto argumentList = cs.getArgumentList(applicableFn.get()->getLocator());
if (!argumentList || cs.containsIDEInspectionTarget(argumentList))
return;
SmallVector<SmallVector<std::pair<Type, /*fromLiteral=*/bool>, 2>, 2>
candidateArgumentTypes;
candidateArgumentTypes.resize(argFuncType->getNumParams());