[clang-tools-extra] 597eae9 - [clangd][Background] Make index validation logs verbose
Kadir Cetinkaya via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 21 03:37:47 PST 2022
Author: Kadir Cetinkaya
Date: 2022-01-21T12:37:20+01:00
New Revision: 597eae998a874a872b67d1a22a04d7c45d2ef94b
URL: https://github.com/llvm/llvm-project/commit/597eae998a874a872b67d1a22a04d7c45d2ef94b
DIFF: https://github.com/llvm/llvm-project/commit/597eae998a874a872b67d1a22a04d7c45d2ef94b.diff
LOG: [clangd][Background] Make index validation logs verbose
These errors are non-harmful and should be transient. They either
imply:
- compilation database returned stale results for TUs and it'll be fixed once
it's updated to match project state.
- a TUs dependencies has changed and some headers no longer exist. this should
be fixed with the next indexing cycle.
In either case the user will have some stale symbols in their index until clangd
restarts and the underlying issue is resolved. On the downside these logs are
confusing users when there's another issue.
Differential Revision: https://reviews.llvm.org/D117792
Added:
Modified:
clang-tools-extra/clangd/index/Background.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/index/Background.cpp b/clang-tools-extra/clangd/index/Background.cpp
index ddfe962d31890..a6ee1d980e049 100644
--- a/clang-tools-extra/clangd/index/Background.cpp
+++ b/clang-tools-extra/clangd/index/Background.cpp
@@ -82,7 +82,7 @@ llvm::SmallString<128> getAbsolutePath(const tooling::CompileCommand &Cmd) {
bool shardIsStale(const LoadedShard &LS, llvm::vfs::FileSystem *FS) {
auto Buf = FS->getBufferForFile(LS.AbsolutePath);
if (!Buf) {
- elog("Background-index: Couldn't read {0} to validate stored index: {1}",
+ vlog("Background-index: Couldn't read {0} to validate stored index: {1}",
LS.AbsolutePath, Buf.getError().message());
// There is no point in indexing an unreadable file.
return false;
More information about the cfe-commits
mailing list