diff --git a/clang-tools-extra/clangd/XRefs.cpp b/clang-tools-extra/clangd/XRefs.cpp --- a/clang-tools-extra/clangd/XRefs.cpp +++ b/clang-tools-extra/clangd/XRefs.cpp @@ -1310,6 +1310,8 @@ QueryKind = RelationKind::BaseOf; } } + if (IDs.empty()) + return {}; return findImplementors(std::move(IDs), QueryKind, Index, *MainFilePath); }