[PATCH] D139088: [clangd] Log diagnostics if we failed to create a preamble.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 1 04:25:45 PST 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG00b9cefacbdf: [clangd] Log diagnostics if we failed to create a preamble. (authored by sammccall).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139088/new/
https://reviews.llvm.org/D139088
Files:
clang-tools-extra/clangd/Preamble.cpp
Index: clang-tools-extra/clangd/Preamble.cpp
===================================================================
--- clang-tools-extra/clangd/Preamble.cpp
+++ clang-tools-extra/clangd/Preamble.cpp
@@ -571,6 +571,12 @@
elog("Could not build a preamble for file {0} version {1}: {2}", FileName,
Inputs.Version, BuiltPreamble.getError().message());
+ for (const Diag &D : PreambleDiagnostics.take()) {
+ if (D.Severity < DiagnosticsEngine::Error)
+ continue;
+ // Not an ideal way to show errors, but better than nothing!
+ elog(" error: {0}", D.Message);
+ }
return nullptr;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139088.479240.patch
Type: text/x-patch
Size: 611 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221201/4d4c2642/attachment.bin>
More information about the cfe-commits
mailing list