forked from OSchip/llvm-project
[clangd] Cleanup a remaining Optional<SymbolID> usage, NFC.
This commit is contained in:
parent
b83b7d0873
commit
c909512fdb
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue