On Mon, 2016-08-29 at 19:55 -0400, David Malcolm wrote:
[...]
> Assuming you have the location_t values available, you can create a
> rich_location for the primary range, and then add secondary ranges
> like
> this:
>
> rich_location richloc (loc_of_arg1);
Oops, the above should be:
rich_location richloc (line_table, loc_of_arg1);
or:
gcc_rich_location (loc_of_arg1);
which does the same thing (#include "gcc-rich-location.h").
> richloc.add_range (loc_of_arg3, false); /* false here = don't draw
> a
> caret, just the underline */
> richloc.add_range (loc_of_arg4, false);
> warning_at_rich_loc (&richloc, OPT_Wrestrict, etc...
>
> See line-map.h for more information on rich_location.
[...]