diff options
author | Ilya Biryukov <ibiryukov@google.com> | 2018-03-12 15:28:22 +0000 |
---|---|---|
committer | Ilya Biryukov <ibiryukov@google.com> | 2018-03-12 15:28:22 +0000 |
commit | 71028b83e7a8d98fd3cdbb75dd4e9b425560dc1e (patch) | |
tree | 8a5ddca47c9a3950f7ea69ba0186e08dc35da1a5 /clang-tools-extra/clangd/SourceCode.h | |
parent | ea2324f88225df30098abea9f89546c02d2f8337 (diff) | |
download | bcm5719-llvm-71028b83e7a8d98fd3cdbb75dd4e9b425560dc1e.tar.gz bcm5719-llvm-71028b83e7a8d98fd3cdbb75dd4e9b425560dc1e.zip |
[clangd] Revamp handling of diagnostics.
Summary:
The new implementation attaches notes to diagnostic message and shows
the original diagnostics in the message of the note.
Reviewers: hokein, ioeric, sammccall
Reviewed By: sammccall
Subscribers: klimek, mgorny, cfe-commits, jkorous-apple
Differential Revision: https://reviews.llvm.org/D44142
llvm-svn: 327282
Diffstat (limited to 'clang-tools-extra/clangd/SourceCode.h')
-rw-r--r-- | clang-tools-extra/clangd/SourceCode.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang-tools-extra/clangd/SourceCode.h b/clang-tools-extra/clangd/SourceCode.h index cd0578b14c0..2bf5d0ec2f4 100644 --- a/clang-tools-extra/clangd/SourceCode.h +++ b/clang-tools-extra/clangd/SourceCode.h @@ -30,6 +30,10 @@ Position offsetToPosition(llvm::StringRef Code, size_t Offset); /// Turn a SourceLocation into a [line, column] pair. Position sourceLocToPosition(const SourceManager &SM, SourceLocation Loc); +// Converts a half-open clang source range to an LSP range. +// Note that clang also uses closed source ranges, which this can't handle! +Range halfOpenToRange(const SourceManager &SM, CharSourceRange R); + } // namespace clangd } // namespace clang #endif |