This revision was automatically updated to reflect the committed changes.
Closed by commit rL358675: [clangd] Support relatedInformation in diagnostics.
(authored by sammccall, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
CHANGES SI
sammccall added a comment.
Discussed further offline - it's not clear that expressing the flattening as
LSP diagnostic -> LSP diagnostic is better than the current Diag -> LSP
diagnostic.
So that followup probably won't happen, and there isn't that much to be gained
from "unifying" the behavio
sammccall marked 2 inline comments as done.
sammccall added inline comments.
Comment at: clangd/Diagnostics.cpp:271
+ if (!Note.AbsFile) {
+log("Dropping note from unknown file: {0}", Note);
+continue;
kadircet wrote:
> ilya-biryukov wrote:
>
kadircet added inline comments.
Comment at: clangd/Diagnostics.cpp:271
+ if (!Note.AbsFile) {
+log("Dropping note from unknown file: {0}", Note);
+continue;
ilya-biryukov wrote:
> Maybe `vlog`? This is what we use for dropped diagnostics, sho
sammccall updated this revision to Diff 195706.
sammccall added a comment.
Propagate the capability to Diagnostics, add lit test.
Repository:
rCTE Clang Tools Extra
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60267/new/
https://reviews.llvm.org/D60267
Files:
clangd/ClangdLSPServ
sammccall updated this revision to Diff 195707.
sammccall added a comment.
Remove accidental copy/paste in lit test.
Repository:
rCTE Clang Tools Extra
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60267/new/
https://reviews.llvm.org/D60267
Files:
clangd/ClangdLSPServer.cpp
clan
sammccall updated this revision to Diff 195694.
sammccall marked an inline comment as done.
sammccall added a comment.
Rebase and address comments.
Repository:
rCTE Clang Tools Extra
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60267/new/
https://reviews.llvm.org/D60267
Files:
cl
sammccall marked 9 inline comments as done.
sammccall added inline comments.
Comment at: clangd/Diagnostics.cpp:280
+ Main.relatedInformation->push_back(std::move(RelInfo));
+}
}
ilya-biryukov wrote:
> NIT: maybe call `OutFn` and return here to avoid
ilya-biryukov added inline comments.
Comment at: clangd/Protocol.cpp:280
R.DiagnosticFixes = *CodeActions;
+ if (auto CodeActions = Diagnostics->getBoolean("relatedInformation"))
+R.DiagnosticRelatedInformation = *CodeActions;
kadircet wrote
kadircet added inline comments.
Comment at: clangd/Protocol.cpp:280
R.DiagnosticFixes = *CodeActions;
+ if (auto CodeActions = Diagnostics->getBoolean("relatedInformation"))
+R.DiagnosticRelatedInformation = *CodeActions;
`s/CodeActions/Rela
ilya-biryukov added inline comments.
Comment at: clangd/Diagnostics.cpp:271
+ if (!Note.AbsFile) {
+log("Dropping note from unknown file: {0}", Note);
+continue;
Maybe `vlog`? This is what we use for dropped diagnostics, should probably
stic
ilya-biryukov added inline comments.
Comment at: clangd/Diagnostics.cpp:185
OS << Note.Message;
- OS << "\n\n";
- printDiag(OS, Main);
+ // If there's no structured link between the note and the original diagnostic
+ // then emit the main diagnostic to give context.
--
sammccall created this revision.
sammccall added a reviewer: ilya-biryukov.
Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay,
ioeric.
Herald added a project: clang.
We already have the structure internally, we just need to expose it.
Repository:
rCTE Clang Tools Ext
13 matches
Mail list logo