kbobyrev added inline comments.
================
Comment at: clang-tools-extra/clangd/index/remote/server/Server.cpp:234
+ LastStatus.getLastModificationTime(),
Status->getLastModificationTime());
+ std::unique_ptr<clang::clangd::SymbolIndex> NewIndex = loadIndex(IndexPath);
+ if (!NewIndex) {
----------------
kadircet wrote:
> i think we should update `LastStatus` here, as we are going to fail loading
> the index unless the file changes. so there's no need to retry loading the
> index if the file hasn't changed.
Sorry, the comment is off, it belongs to the `if` statement above. Here, the
index file is already different and there is an attempt to reload it. If it
succeeds, new index replaces the old one and `LastStatus` is updated.
================
Comment at: clang-tools-extra/clangd/index/remote/server/Server.cpp:342
+ HotReloadThread.join();
}
----------------
kadircet wrote:
> nit: `return 0;` ?
No need for that in C++.
https://en.cppreference.com/w/cpp/language/main_function
> 4) The body of the main function does not need to contain the return
> statement: if control reaches the end of main without encountering a return
> statement, the effect is that of executing `return 0;`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87450/new/
https://reviews.llvm.org/D87450
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits