summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorSam McCall <sam.mccall@gmail.com>2017-12-13 08:48:42 +0000
committerSam McCall <sam.mccall@gmail.com>2017-12-13 08:48:42 +0000
commit8111d3b89ccdc854a88113402f4eed935605d6f4 (patch)
treea759503bfcfe712e81e525af1f4bf0e96cc1d9f4 /clang/lib/Frontend/CompilerInvocation.cpp
parentd404654987e62b150e82c715b6e3062081cdf2f9 (diff)
downloadbcm5719-llvm-8111d3b89ccdc854a88113402f4eed935605d6f4.tar.gz
bcm5719-llvm-8111d3b89ccdc854a88113402f4eed935605d6f4.zip
[clangd] Emit ranges for clangd diagnostics, and fix off-by-one positions
Summary: - when the diagnostic has an explicit range, we prefer that - if the diagnostic has a fixit, its RemoveRange is our next choice - otherwise we try to expand the diagnostic location into a whole token. (inspired by VSCode, which does this client-side when given an empty range) - if all else fails, we return the zero-width range as now. (clients react in different ways to this, highlighting a token or a char) - this includes the off-by-one fix from D40860, and borrows heavily from it Reviewers: rwols, hokein Subscribers: klimek, ilya-biryukov, cfe-commits Differential Revision: https://reviews.llvm.org/D41118 llvm-svn: 320555
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud