Skip to content

Commit c3d5f30

Browse files
committed
[clangd] Find implementors only when index is present.
Differential Revision: https://reviews.llvm.org/D101750
1 parent fd18547 commit c3d5f30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang-tools-extra/clangd/XRefs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ std::vector<LocatedSymbol> findImplementors(llvm::DenseSet<SymbolID> IDs,
299299
RelationKind Predicate,
300300
const SymbolIndex *Index,
301301
llvm::StringRef MainFilePath) {
302-
if (IDs.empty())
302+
if (IDs.empty() || !Index)
303303
return {};
304304
static constexpr trace::Metric FindImplementorsMetric(
305305
"find_implementors", trace::Metric::Counter, "case");

0 commit comments

Comments
 (0)