[PATCH] D116827: Don't pass uninitialized QueryKind

Vitaly Buka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 7 15:04:56 PST 2022


vitalybuka added a comment.

In D116827#3228524 <https://reviews.llvm.org/D116827#3228524>, @kda wrote:

> This seems to introduce a new branch, should there be a new unit test in: XRefsTests.cpp?

It's not functional change, test should not be able to see a difference after this patch.



================
Comment at: clang-tools-extra/clangd/XRefs.cpp:1313
   }
+  if (IDs.empty())
+    return {};
----------------
kda wrote:
> It seems like the first line of 'findImplementors' is 'if (IDs.empty() || !Index)`.
> I wonder if the correct fix is to drop the '!Index' check in findImplementors.
Sorry, I am no following how "Index" is related to uninitialized QueryKind?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116827/new/

https://reviews.llvm.org/D116827



More information about the cfe-commits mailing list