Hi List!
I’m currently working on a Tidy check which implements interface design rule from cppcoreguidelines (“avoid adjacent args of same type”).
The problem with such a check is two-fold: the highlight of the diagnostic it should give isn’t a singles AST node but a range.
But this->diag only accept a source location.
I’d wish to highlight a “custom” range (from beginning of one node’s sourceloc through the last letter of another node, they appear sequentially in the source text).
I know fixit replace/delete hint works with ranges, but the diagnostic itself isn’t about something that is trivially fixable with an automatically generated hint.
How would you go about doing this in a proper and user friendly way?
Putting two notes like “range begins here” and “range ends here” is ugly.
Regards,
Whisperity.