ioeric added inline comments. Herald added a subscriber: kadircet.
================ Comment at: clangd/TUScheduler.h:66 + /// instead. + virtual void onMainAST(PathRef Path, ParsedAST &AST) = 0; +}; ---------------- ilya-biryukov wrote: > hokein wrote: > > 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? > Currently we only call this when AST is built for diagnostics, so we will > have only a single callback, even if the AST will be rebuilt multiple times > because it was flushed out of the cash (as long as the file contents didn't > change, of course). > > So we do behave optimally in that case and I suggest we keep it this way is there any overlap between preamble AST and main AST? If so, could you elaborate in the documentation? 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