[clang-tools-extra] [clangd] Header not found error message now contains file path (PR #136096)
Tongsheng Wu via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 17 18:30:22 PDT 2025
https://github.com/tongshengw updated https://github.com/llvm/llvm-project/pull/136096
>From fa866721e59707060165d588d3797acd49792837 Mon Sep 17 00:00:00 2001
From: Tongsheng Wu <tongshengwu0 at gmail.com>
Date: Thu, 17 Apr 2025 03:25:36 -0400
Subject: [PATCH] [clangd] Header not found error message now contains file
path
---
clang-tools-extra/clangd/IncludeCleaner.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/clang-tools-extra/clangd/IncludeCleaner.cpp b/clang-tools-extra/clangd/IncludeCleaner.cpp
index e34706172f0bf..dc4c8fc498b1f 100644
--- a/clang-tools-extra/clangd/IncludeCleaner.cpp
+++ b/clang-tools-extra/clangd/IncludeCleaner.cpp
@@ -345,8 +345,9 @@ include_cleaner::Includes convertIncludes(const ParsedAST &AST) {
// which is based on FileManager::getCanonicalName(ParentDir).
auto FE = SM.getFileManager().getFileRef(Inc.Resolved);
if (!FE) {
- elog("IncludeCleaner: Failed to get an entry for resolved path {0}: {1}",
- Inc.Resolved, FE.takeError());
+ elog("IncludeCleaner: Failed to get an entry for resolved path '{0}' "
+ "from include {1} : {2}",
+ Inc.Resolved, Inc.Written, FE.takeError());
continue;
}
TransformedInc.Resolved = *FE;
More information about the cfe-commits
mailing list