This is an archive of the discontinued LLVM Phabricator instance.

[clang][Diagnostics] Split source ranges into line ranges before...
ClosedPublic

Authored by tbaeder on May 23 2023, 7:44 AM.

Details

Summary
... 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.

Diff Detail

Event Timeline

tbaeder created this revision.May 23 2023, 7:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 23 2023, 7:44 AM
tbaeder requested review of this revision.May 23 2023, 7:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 23 2023, 7:44 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
aaron.ballman added subscribers: cor3ntin, tahonermann.

This looks correct to me, but because it involves things like characters, lines, and output, I'd appreciate if @tahonermann or @cor3ntin could do the final sign-off just in case I missed something.

cor3ntin accepted this revision.Jun 1 2023, 11:15 PM

Looks good to me too!

This revision is now accepted and ready to land.Jun 1 2023, 11:15 PM
This revision was landed with ongoing or failed builds.Jun 1 2023, 11:52 PM
This revision was automatically updated to reflect the committed changes.
tbaeder updated this revision to Diff 527766.Jun 2 2023, 12:12 AM

@cor3ntin I added changes to the two brackets tests in test/Parser/. They look like an improvement to me, but maybe there's something I'm missing, so please have a quick look.

This revision was landed with ongoing or failed builds.Jun 5 2023, 5:57 AM