ilya-biryukov added inline comments.
================ Comment at: clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp:287 + StaticIdx.reset(Placeholder = new SwapIndex(llvm::make_unique<MemIndex>())); + runAsync<void>([Placeholder] { + if (auto Idx = loadIndex(YamlSymbolFile)) ---------------- Wouldn't the future returned by `runAsync` wait in destructor? ================ Comment at: clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp:288 + runAsync<void>([Placeholder] { + if (auto Idx = loadIndex(YamlSymbolFile)) + Placeholder->reset(std::move(Idx)); ---------------- What happens if clangd tries to exit before the index is loaded? Could lead to crashes. Repository: rL LLVM https://reviews.llvm.org/D51638 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits