Skip to content

Commit ed14e0d

Browse files
[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.
1 parent c979d1f commit ed14e0d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

clang-tools-extra/clangd/ConfigYAML.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88
#include "ConfigFragment.h"
9+
#include "support/Logger.h"
910
#include "llvm/ADT/SmallSet.h"
1011
#include "llvm/ADT/SmallString.h"
1112
#include "llvm/ADT/StringRef.h"
@@ -486,6 +487,7 @@ std::vector<Fragment> Fragment::parseYAML(llvm::StringRef YAML,
486487
DiagnosticCallback Diags) {
487488
// The YAML document may contain multiple conditional fragments.
488489
// The SourceManager is shared for all of them.
490+
log("Loading config file at {0}", BufferName);
489491
auto SM = std::make_shared<llvm::SourceMgr>();
490492
auto Buf = llvm::MemoryBuffer::getMemBufferCopy(YAML, BufferName);
491493
// Adapt DiagnosticCallback to function-pointer interface.

0 commit comments

Comments
 (0)