[PATCH] D42942: [clangd] Collect definitions when indexing.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 6 01:41:56 PST 2018


hokein added a comment.

I like where the patch is going now.



================
Comment at: clangd/global-symbol-builder/GlobalSymbolBuilderMain.cpp:67
+      // XXX this is just to make running the tool fast during dev!
+      bool BeginInvocation(CompilerInstance &CI) override {
+        const auto &Inputs = CI.getInvocation().getFrontendOpts().Inputs;
----------------
It is fine for debugging, but I think we don't want this behavior by default.

global-symbol-builder also supports running a single TU (`global-symbol-builder /path/to/file`), which is sufficient for debugging, I think?



================
Comment at: clangd/index/Index.h:131
   SymbolLocation CanonicalDeclaration;
+  SymbolLocation Definition;
 
----------------
We might want to update the comment above.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D42942





More information about the cfe-commits mailing list