ilya-biryukov added a comment.

> We would like to move the preamble index out of the critical path

Could you provide motivation why you need to do it? What is the underlying 
problem that this change is trying to solve?
We rely on preamble being indexed at that particular time for correct results 
in future steps, it's definitely not a no-op change even if the threading 
issues are resolved (see the other comment).



================
Comment at: clang-tools-extra/clangd/ClangdServer.cpp:88
+    if (PreambleIndexTask)
+      PreambleIndexTask->runAsync("task:" + Path + Version,
+                                  std::move(Task));
----------------
This definitely does not work. After `onPreambleAST` returns, the AST will be 
destroyed and async tasks may access it afterwards.



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D148088

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to