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