[clangd] Cleanup a remaining Optional<SymbolID> usage, NFC.

This commit is contained in:
Haojian Wu 2021-01-08 13:42:33 +01:00
parent b83b7d0873
commit c909512fdb
1 changed files with 5 additions and 5 deletions

View File

@ -828,9 +828,9 @@ private:
};
struct ScoredSignature {
// When set, requires documentation to be requested from the index with this
// ID.
llvm::Optional<SymbolID> IDForDoc;
// When not null, requires documentation to be requested from the index with
// this ID.
SymbolID IDForDoc;
SignatureInformation Signature;
SignatureQualitySignals Quality;
};
@ -894,7 +894,7 @@ public:
for (const auto &S : ScoredSignatures) {
if (!S.IDForDoc)
continue;
IndexRequest.IDs.insert(*S.IDForDoc);
IndexRequest.IDs.insert(S.IDForDoc);
}
Index->lookup(IndexRequest, [&](const Symbol &S) {
if (!S.Documentation.empty())
@ -939,7 +939,7 @@ public:
for (auto &SS : ScoredSignatures) {
auto IndexDocIt =
SS.IDForDoc ? FetchedDocs.find(*SS.IDForDoc) : FetchedDocs.end();
SS.IDForDoc ? FetchedDocs.find(SS.IDForDoc) : FetchedDocs.end();
if (IndexDocIt != FetchedDocs.end())
SS.Signature.documentation = IndexDocIt->second;