ivanmurashko added inline comments.

================
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
----------------
sammccall wrote:
> 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.
I applied the change


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

Reply via email to