Concrete subclass of libcpp's range_label for use in
diagnostics involving mismatched types.
Each frontend that uses this should supply its own implementation.
Generate a label describing LABELLED_TYPE. The frontend may use
OTHER_TYPE where appropriate for highlighting the differences between
the two types (analogous to C++'s use of %H and %I with
template types).
Either or both of LABELLED_TYPE and OTHER_TYPE may be NULL_TREE.
If LABELLED_TYPE is NULL_TREE, then there is no label.
For example, this rich_location could use two instances of
range_label_for_type_mismatch:
printf ("arg0: %i arg1: %s arg2: %i",
^~
|
const char *
100, 101, 102);
~~~
|
int
(a) the label for "%s" with LABELLED_TYPE for "const char*" and
(b) the label for "101" with LABELLED TYPE for "int"
where each one uses the other's type as OTHER_TYPE.