sammccall 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. > https://reviews.llvm.org/D115768 is a very rough prototype from a couple of years ago of how to keep the preamble AST alive in a separate object that I believe would be safe to index from even after returning from onPreambleAST. (Though the patch doesn't actually do that, that was the idea) 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