We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d97795 commit 995083cCopy full SHA for 995083c
lib/Sema/BuilderTransform.cpp
@@ -1079,6 +1079,9 @@ class ResultBuilderTransform
1079
// to rank code completion items that match the type expected by
1080
// buildBlock higher.
1081
buildBlockArguments.push_back(expr);
1082
+ } else if (ctx.CompletionCallback && expr->getSourceRange().isValid() && !ctx.SourceMgr.rangeContainsIDEInspectionTarget(expr->getSourceRange())) {
1083
+ auto *resultVar = buildPlaceholderVar(expr->getStartLoc(), newBody);
1084
+ buildBlockArguments.push_back(builder.buildVarRef(resultVar, expr->getStartLoc()));
1085
} else {
1086
auto *capture = captureExpr(expr, newBody);
1087
// A reference to the synthesized variable is passed as an argument
0 commit comments