[PATCH] D94785: [clangd] Index local classes, virtual and overriding methods.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 19 01:45:30 PST 2021


hokein added a comment.

mostly good.

I think we'd better bump the index version, even though this is not a breaking change, but we will collect more data. Not bumping the index version may lead to a half-completed state of the index (e.g. only newly-changed files will get completed index data in background index).



================
Comment at: clang-tools-extra/clangd/index/SymbolCollector.cpp:227
+  // Index all virtual and overridding methods.
+  if (const auto *CXXMD = llvm::dyn_cast<CXXMethodDecl>(&ND))
+    if (CXXMD->isVirtual() || !CXXMD->overridden_methods().empty())
----------------
having a special case here is subtle, I think the reason we need this is to filter out non-virtual methods etc for function-local classes? not sure we should do this, my guess is that we wouldn't save too much, I'd just remove this and index all members for function-local classes. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94785



More information about the cfe-commits mailing list