[PATCH] D148088: [RFC][clangd] Move preamble index task to a seperate task

Kugan Vivekanandarajah via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 2 12:48:30 PDT 2023


kuganv marked an inline comment as done.
kuganv added inline comments.


================
Comment at: clang-tools-extra/clangd/ClangdServer.cpp:88
+    if (PreambleIndexTask)
+      PreambleIndexTask->runAsync("task:" + Path + Version,
+                                  std::move(Task));
----------------
ilya-biryukov wrote:
> This definitely does not work. After `onPreambleAST` returns, the AST will be destroyed and async tasks may access it afterwards.
> 
Thanks for the review and suggestion. Let me rework the prototype to address this.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148088/new/

https://reviews.llvm.org/D148088



More information about the cfe-commits mailing list