From ed14e0da77e3ab6f66ea51f07c1ac6bbf06df113 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Fri, 30 May 2025 22:31:12 -0400 Subject: [PATCH] [clangd] Log the paths of loaded config files without --log=verbose (#142063) Users sometimes forget about configuration they've placed in the user config file, or an ancestor directory of their project. Logging the paths of loaded config files by default (without --log=verbose) surfaces more readily where clangd is getting its configuration from. --- clang-tools-extra/clangd/ConfigYAML.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clang-tools-extra/clangd/ConfigYAML.cpp b/clang-tools-extra/clangd/ConfigYAML.cpp index ff457d870130..6086357d8f0d 100644 --- a/clang-tools-extra/clangd/ConfigYAML.cpp +++ b/clang-tools-extra/clangd/ConfigYAML.cpp @@ -6,6 +6,7 @@ // //===----------------------------------------------------------------------===// #include "ConfigFragment.h" +#include "support/Logger.h" #include "llvm/ADT/SmallSet.h" #include "llvm/ADT/SmallString.h" #include "llvm/ADT/StringRef.h" @@ -486,6 +487,7 @@ std::vector Fragment::parseYAML(llvm::StringRef YAML, DiagnosticCallback Diags) { // The YAML document may contain multiple conditional fragments. // The SourceManager is shared for all of them. + log("Loading config file at {0}", BufferName); auto SM = std::make_shared(); auto Buf = llvm::MemoryBuffer::getMemBufferCopy(YAML, BufferName); // Adapt DiagnosticCallback to function-pointer interface.