sammccall created this revision.
sammccall added a reviewer: hokein.
Herald added subscribers: kadircet, arphaman.
Herald added a project: All.
sammccall requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov.
Herald added a project: clang-tools-extra.
Really we want these to be shown to the client, but the path to do so involves
storing them in
Bandaid for https://github.com/clangd/clangd/issues/1408
See https://github.com/clangd/clangd/issues/1399 for motivation
Repository:
rG LLVM Github Monorepo
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;
}
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;
}
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits