kuhnel added inline comments.
================ Comment at: clang-tools-extra/clangd/ClangdServer.cpp:180 + if (Opts.IndexStandardLibrary) { + auto SLIndex = indexStandardLibrary(TFS); + if (!SLIndex || !SLIndex->get()) { ---------------- I'm not sure if returning a Expected<T> makes sense here. I suppose logging could be done from StandardLibraryIndex just as well. ================ Comment at: clang-tools-extra/clangd/ClangdServer.cpp:184 + } + AddIndex(SLIndex->get()); + } ---------------- sammccall wrote: > this pointer will dangle after the `if` block finishes (the local `auto` owns > the index) Ah yes, you're right. The other indexes are kept in member variables... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108119/new/ https://reviews.llvm.org/D108119 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits