ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land.
lg ================ Comment at: clangd/TUScheduler.cpp:360 std::lock_guard<std::mutex> Lock(Mutex); + OldPreamble.reset(); if (NewPreamble) ---------------- ilya-biryukov wrote: > ioeric wrote: > > Why reset? > We don't need the old preamble at this point, so we give it a chance to die > (if there are no more references). > Note that there's an expensive operation that follows (building the AST), so > removing the preamble before it seems like a win sg. and do we guard this with mutex because the same old preamble data can be accessed by other threads? might worth a comment. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49783 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits