@@ -4030,8 +4030,7 @@ class CompletionLookup final : public swift::VisibleDeclConsumer {
4030
4030
// / Add '#file', '#line', et at.
4031
4031
void addPoundLiteralCompletions (bool needPound) {
4032
4032
auto addFromProto = [&](StringRef name, CodeCompletionKeywordKind kwKind,
4033
- CodeCompletionLiteralKind literalKind,
4034
- StringRef defaultTypeName) {
4033
+ CodeCompletionLiteralKind literalKind) {
4035
4034
if (!needPound)
4036
4035
name = name.substr (1 );
4037
4036
@@ -4045,17 +4044,17 @@ class CompletionLookup final : public swift::VisibleDeclConsumer {
4045
4044
};
4046
4045
4047
4046
addFromProto (" #function" , CodeCompletionKeywordKind::pound_function,
4048
- CodeCompletionLiteralKind::StringLiteral, " String " );
4047
+ CodeCompletionLiteralKind::StringLiteral);
4049
4048
addFromProto (" #file" , CodeCompletionKeywordKind::pound_file,
4050
- CodeCompletionLiteralKind::StringLiteral, " String " );
4049
+ CodeCompletionLiteralKind::StringLiteral);
4051
4050
if (Ctx.LangOpts .EnableConcisePoundFile ) {
4052
4051
addFromProto (" #filePath" , CodeCompletionKeywordKind::pound_file,
4053
- CodeCompletionLiteralKind::StringLiteral, " String " );
4052
+ CodeCompletionLiteralKind::StringLiteral);
4054
4053
}
4055
4054
addFromProto (" #line" , CodeCompletionKeywordKind::pound_line,
4056
- CodeCompletionLiteralKind::IntegerLiteral, " Int " );
4055
+ CodeCompletionLiteralKind::IntegerLiteral);
4057
4056
addFromProto (" #column" , CodeCompletionKeywordKind::pound_column,
4058
- CodeCompletionLiteralKind::IntegerLiteral, " Int " );
4057
+ CodeCompletionLiteralKind::IntegerLiteral);
4059
4058
4060
4059
addKeyword (needPound ? " #dsohandle" : " dsohandle" , " UnsafeRawPointer" ,
4061
4060
CodeCompletionKeywordKind::pound_dsohandle);
@@ -4065,7 +4064,7 @@ class CompletionLookup final : public swift::VisibleDeclConsumer {
4065
4064
auto &context = CurrDeclContext->getASTContext ();
4066
4065
4067
4066
auto addFromProto = [&](
4068
- CodeCompletionLiteralKind kind, StringRef defaultTypeName,
4067
+ CodeCompletionLiteralKind kind,
4069
4068
llvm::function_ref<void (CodeCompletionResultBuilder &)> consumer,
4070
4069
bool isKeyword = false ) {
4071
4070
@@ -4083,29 +4082,29 @@ class CompletionLookup final : public swift::VisibleDeclConsumer {
4083
4082
using Builder = CodeCompletionResultBuilder;
4084
4083
4085
4084
// Add literal completions that conform to specific protocols.
4086
- addFromProto (LK::IntegerLiteral, " Int " , [](Builder &builder) {
4085
+ addFromProto (LK::IntegerLiteral, [](Builder &builder) {
4087
4086
builder.addTextChunk (" 0" );
4088
4087
});
4089
- addFromProto (LK::BooleanLiteral, " Bool " , [](Builder &builder) {
4088
+ addFromProto (LK::BooleanLiteral, [](Builder &builder) {
4090
4089
builder.addBaseName (" true" );
4091
4090
}, /* isKeyword=*/ true );
4092
- addFromProto (LK::BooleanLiteral, " Bool " , [](Builder &builder) {
4091
+ addFromProto (LK::BooleanLiteral, [](Builder &builder) {
4093
4092
builder.addBaseName (" false" );
4094
4093
}, /* isKeyword=*/ true );
4095
- addFromProto (LK::NilLiteral, " " , [](Builder &builder) {
4094
+ addFromProto (LK::NilLiteral, [](Builder &builder) {
4096
4095
builder.addBaseName (" nil" );
4097
4096
}, /* isKeyword=*/ true );
4098
- addFromProto (LK::StringLiteral, " String " , [&](Builder &builder) {
4097
+ addFromProto (LK::StringLiteral, [&](Builder &builder) {
4099
4098
builder.addTextChunk (" \" " );
4100
4099
builder.addSimpleNamedParameter (" abc" );
4101
4100
builder.addTextChunk (" \" " );
4102
4101
});
4103
- addFromProto (LK::ArrayLiteral, " Array " , [&](Builder &builder) {
4102
+ addFromProto (LK::ArrayLiteral, [&](Builder &builder) {
4104
4103
builder.addLeftBracket ();
4105
4104
builder.addSimpleNamedParameter (" values" );
4106
4105
builder.addRightBracket ();
4107
4106
});
4108
- addFromProto (LK::DictionaryLiteral, " Dictionary " , [&](Builder &builder) {
4107
+ addFromProto (LK::DictionaryLiteral, [&](Builder &builder) {
4109
4108
builder.addLeftBracket ();
4110
4109
builder.addSimpleNamedParameter (" key" );
4111
4110
builder.addTextChunk (" : " );
@@ -4114,7 +4113,7 @@ class CompletionLookup final : public swift::VisibleDeclConsumer {
4114
4113
});
4115
4114
4116
4115
auto floatType = context.getFloatDecl ()->getDeclaredType ();
4117
- addFromProto (LK::ColorLiteral, " " , [&](Builder &builder) {
4116
+ addFromProto (LK::ColorLiteral, [&](Builder &builder) {
4118
4117
builder.addBaseName (" #colorLiteral" );
4119
4118
builder.addLeftParen ();
4120
4119
builder.addCallParameter (context.getIdentifier (" red" ), floatType);
@@ -4128,7 +4127,7 @@ class CompletionLookup final : public swift::VisibleDeclConsumer {
4128
4127
});
4129
4128
4130
4129
auto stringType = context.getStringDecl ()->getDeclaredType ();
4131
- addFromProto (LK::ImageLiteral, " " , [&](Builder &builder) {
4130
+ addFromProto (LK::ImageLiteral, [&](Builder &builder) {
4132
4131
builder.addBaseName (" #imageLiteral" );
4133
4132
builder.addLeftParen ();
4134
4133
builder.addCallParameter (context.getIdentifier (" resourceName" ),
0 commit comments