[PATCH] D62839: [clangd] Index API and implementations for relations

Nathan Ridge via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 11 16:31:02 PDT 2019


nridge added inline comments.


================
Comment at: clang-tools-extra/clangd/index/FileIndex.cpp:250
       Path, llvm::make_unique<SymbolSlab>(std::move(Symbols)),
-      llvm::make_unique<RefSlab>(), /*CountReferences=*/false);
+      llvm::make_unique<RefSlab>(), llvm::make_unique<RelationSlab>(),
+      /*CountReferences=*/false);
----------------
kadircet wrote:
> I think we need to pass relationslab in here. Since we might miss relations like the following that are outside the main file:
> ```
> class A {};
> class B : public A {};
> ```
> Would be glad if you could prove me right/wrong with a unittest as well.
You are right! Fixed, and added a test to FileIndexTests.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62839





More information about the cfe-commits mailing list