@@ -7406,81 +7406,6 @@ void CodeCompletionCallbacksImpl::doneParsing() {
7406
7406
deliverCompletionResults (CompletionContext, Lookup, CurDeclContext, Consumer);
7407
7407
}
7408
7408
7409
- void PrintingCodeCompletionConsumer::handleResults (
7410
- CodeCompletionContext &context) {
7411
- auto results = context.takeResults ();
7412
- handleResults (results);
7413
- }
7414
-
7415
- void PrintingCodeCompletionConsumer::handleResults (
7416
- MutableArrayRef<CodeCompletionResult *> Results) {
7417
- unsigned NumResults = 0 ;
7418
- for (auto Result : Results) {
7419
- if (!IncludeKeywords && Result->getKind () == CodeCompletionResult::Keyword)
7420
- continue ;
7421
- ++NumResults;
7422
- }
7423
- if (NumResults == 0 )
7424
- return ;
7425
-
7426
- OS << " Begin completions, " << NumResults << " items\n " ;
7427
- for (auto Result : Results) {
7428
- if (!IncludeKeywords && Result->getKind () == CodeCompletionResult::Keyword)
7429
- continue ;
7430
- Result->printPrefix (OS);
7431
- if (PrintAnnotatedDescription) {
7432
- printCodeCompletionResultDescriptionAnnotated (*Result, OS, /* leadingPunctuation=*/ false );
7433
- OS << " ; typename=" ;
7434
- printCodeCompletionResultTypeNameAnnotated (*Result, OS);
7435
- } else {
7436
- Result->getCompletionString ()->print (OS);
7437
- }
7438
-
7439
- OS << " ; name=" ;
7440
- printCodeCompletionResultFilterName (*Result, OS);
7441
-
7442
- if (IncludeSourceText) {
7443
- OS << " ; sourcetext=" ;
7444
- SmallString<64 > buf;
7445
- {
7446
- llvm::raw_svector_ostream bufOS (buf);
7447
- printCodeCompletionResultSourceText (*Result, bufOS);
7448
- }
7449
- OS.write_escaped (buf);
7450
- }
7451
-
7452
- StringRef comment = Result->getBriefDocComment ();
7453
- if (IncludeComments && !comment.empty ()) {
7454
- OS << " ; comment=" << comment;
7455
- }
7456
-
7457
- if (Result->getDiagnosticSeverity () !=
7458
- CodeCompletionDiagnosticSeverity::None) {
7459
- OS << " ; diagnostics=" << comment;
7460
- switch (Result->getDiagnosticSeverity ()) {
7461
- case CodeCompletionDiagnosticSeverity::Error:
7462
- OS << " error" ;
7463
- break ;
7464
- case CodeCompletionDiagnosticSeverity::Warning:
7465
- OS << " warning" ;
7466
- break ;
7467
- case CodeCompletionDiagnosticSeverity::Remark:
7468
- OS << " remark" ;
7469
- break ;
7470
- case CodeCompletionDiagnosticSeverity::Note:
7471
- OS << " note" ;
7472
- break ;
7473
- case CodeCompletionDiagnosticSeverity::None:
7474
- llvm_unreachable (" none" );
7475
- }
7476
- OS << " :" << Result->getDiagnosticMessage ();
7477
- }
7478
-
7479
- OS << " \n " ;
7480
- }
7481
- OS << " End completions\n " ;
7482
- }
7483
-
7484
7409
namespace {
7485
7410
class CodeCompletionCallbacksFactoryImpl
7486
7411
: public CodeCompletionCallbacksFactory {
0 commit comments