Changeset View
Changeset View
Standalone View
Standalone View
clangd/CodeComplete.cpp
Show First 20 Lines • Show All 464 Lines • ▼ Show 20 Lines | for (unsigned I = 0; I < NumResults; ++I) { | ||||
if (!Opts.IncludeIneligibleResults && | if (!Opts.IncludeIneligibleResults && | ||||
(Result.Availability == CXAvailability_NotAvailable || | (Result.Availability == CXAvailability_NotAvailable || | ||||
Result.Availability == CXAvailability_NotAccessible)) | Result.Availability == CXAvailability_NotAccessible)) | ||||
continue; | continue; | ||||
// Destructor completion is rarely useful, and works inconsistently. | // Destructor completion is rarely useful, and works inconsistently. | ||||
// (s.^ completes ~string, but s.~st^ is an error). | // (s.^ completes ~string, but s.~st^ is an error). | ||||
if (dyn_cast_or_null<CXXDestructorDecl>(Result.Declaration)) | if (dyn_cast_or_null<CXXDestructorDecl>(Result.Declaration)) | ||||
continue; | continue; | ||||
// We choose to never append '::' to completion results in clangd. | |||||
Result.StartsNestedNameSpecifier = false; | |||||
Results.push_back(Result); | Results.push_back(Result); | ||||
} | } | ||||
ResultsCallback(); | ResultsCallback(); | ||||
} | } | ||||
CodeCompletionAllocator &getAllocator() override { return *CCAllocator; } | CodeCompletionAllocator &getAllocator() override { return *CCAllocator; } | ||||
CodeCompletionTUInfo &getCodeCompletionTUInfo() override { return CCTUInfo; } | CodeCompletionTUInfo &getCodeCompletionTUInfo() override { return CCTUInfo; } | ||||
▲ Show 20 Lines • Show All 543 Lines • Show Last 20 Lines |