[CodeCompletion] Fix placeholder rendering for addSimpleNamedParameter()

When parameter is added by addSimpleNamedParameter(), the type name
doesn't exist. Instead of printing empty strings, use short version of
editor placeholders.

rdar://83904268
This commit is contained in:
Rintaro Ishizaki
2022-03-03 15:59:18 -08:00
parent 9664560855
commit a75b80c198
2 changed files with 34 additions and 34 deletions

View File

@@ -410,7 +410,7 @@ constructTextForCallParam(ArrayRef<CodeCompletionString::Chunk> ParamGroup,
OS << "<#T##" << Display;
if (Display == Type && Display == ExpansionType) {
// Short version, display and type are the same.
} else {
} else if (!Type.empty()) {
OS << "##" << Type;
if (ExpansionType != Type)
OS << "##" << ExpansionType;