sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land.
Nice catch! ================ Comment at: clang-tools-extra/clangd/Preamble.cpp:709 Ctx->setStatCache(Result->StatCache); + // We have to setup DiagnosticConsumer that will be alife + // while preamble callback is executed ---------------- I think this should go up next to PreambleDiagsEngine.reset() etc, as it's basically the same thing: we're trying to avoid any race between the async work done by the callback and the cleanup at the end of the function. Also I think it's slightly clearer for us to consistently be taking the diagnostics from PreambleDiagnostics *after* it's detached from the compiler. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159363/new/ https://reviews.llvm.org/D159363 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits