[CodeCompletion] Pre-expand closures in argument completion

When completing a single argument for a trailing closure, pre-expand the
closure expression syntax instead of using a placeholder. It's not valid
to pass a non-closure anyway.

rdar://62189182
This commit is contained in:
Ben Langmuir
2020-05-01 12:11:40 -07:00
committed by John McCall
parent 2bf014dc74
commit 37b98af4e6
10 changed files with 168 additions and 29 deletions

View File

@@ -1231,6 +1231,7 @@ void CompletionBuilder::getFilterName(CodeCompletionString *str,
case ChunkKind::TypeAnnotation:
case ChunkKind::CallParameterInternalName:
case ChunkKind::CallParameterClosureType:
case ChunkKind::CallParameterClosureExpr:
case ChunkKind::CallParameterType:
case ChunkKind::DeclAttrParamColon:
case ChunkKind::Comma: