[PATCH] D41289: [clangd] Build dynamic index and use it for code completion.

Eric Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 19 09:57:39 PST 2017


ioeric added a comment.

Thanks for the quick review!



================
Comment at: clangd/ClangdUnit.cpp:617
+      new CppFile(FileName, std::move(Command), StorePreamblesInMemory,
+                  std::move(PCHs), std::move(ASTCallback)));
 }
----------------
sammccall wrote:
> CppFile doesn't need to pass the path, do you want `[FileName, ASTCallback](const Context &C, ParsedAST *AST) { ASTCallback(C, FileName, AST); }`
The downside is 1) we need to worry about the life time of FileName 2) we need another type for the new callback, so I am inclined to simply forward the callback.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D41289





More information about the cfe-commits mailing list