[PATCH] D136925: [clangd] Index unscoped enums inside classes for code completion

Nathan Ridge via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 1 02:51:10 PDT 2022


nridge added inline comments.


================
Comment at: clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp:2966
       {cls("nx::Clangd1"), cls("ny::Clangd2"), cls("Clangd3"),
-       cls("na::nb::Clangd4")},
+       cls("na::nb::Clangd4"), enmConstant("na::C::Clangd5")},
       Opts);
----------------
nridge wrote:
> Hmm, I don't think this type of test actually exercises the `isIndexedForCodeCompletion()` codepath (since we're just mocking out the index contents, instead of running the actual indexer).
> 
> Could we use [this type](https://searchfox.org/llvm/source/clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp#3341-3359) instead?
> 
> (Sorry, this is partly my fault for not looking more carefully at what sorts of tests are in CodeCompleteTests.cpp before my earlier comment.)
(Indeed, this test passes even without the change to CodeComplete.cpp.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136925



More information about the cfe-commits mailing list