hokein added a comment. Thanks for adding it.
================ Comment at: clangd/TUScheduler.cpp:406 // We only need to build the AST if diagnostics were requested. if (WantDiags == WantDiagnostics::No) return; ---------------- The AST might not get built if `WantDiags::No`, and will be built in `runWithAST`. ================ Comment at: clangd/TUScheduler.h:66 + /// instead. + virtual void onMainAST(PathRef Path, ParsedAST &AST) = 0; +}; ---------------- Does the callback get called every time we built an AST? clangd only has 3 idle ASTs, if the AST is not there, we rebuild it when needed (even the source code is not changed), and we will update the dynamic index, which seems unnecessary. It may rarely happen, 3 idle ASTs might cover most cases, I think? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50847 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits