[clang][Diagnostics] Split source ranges into line ranges before...
authorTimm Bäder <tbaeder@redhat.com>
Tue, 23 May 2023 14:33:59 +0000 (16:33 +0200)
committerTimm Bäder <tbaeder@redhat.com>
Fri, 2 Jun 2023 06:52:03 +0000 (08:52 +0200)
commitfc1262bd58ac54ad0a0bfa9750254b81c742bbb5
tree563f8046c5514eadfd3e2bb366a84964f5276d1e
parente66f2beba8b38b148d3a892326a7133c388ffbfb
[clang][Diagnostics] Split source ranges into line ranges before...

... emitting them.

This makes later code easier to understand, since we emit the code
snippets line by line anyway.
It also fixes the weird underlinig of multi-line source ranges.

Differential Revision: https://reviews.llvm.org/D151215
clang/lib/Frontend/TextDiagnostic.cpp
clang/test/Misc/caret-diags-multiline.cpp