I forgot to state what changed in the v2. Now, following the DECL_ORIGIN
is done in lhd_print_error_function instead of lhd_decl_printable_name
because lhd_decl_printable_name was used in other circumstances, like
dumping RTL. This caused test failures.
Currently, if a warning references a cloned function, the name of the cloned
function will be emitted in the "In function %qs" part of the diagnostic,
which users aren't supposed to see. This patch follows the DECL_ORIGIN link
to get the name of the original function.
gcc/ChangeLog:
PR dia