Re: [PATCH v2] diagnostics: Follow DECL_ORIGIN in lhd_print_error_function [PR102061]

2024-08-07 Thread Peter0x44
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.

[PATCH v2] diagnostics: Follow DECL_ORIGIN in lhd_print_error_function [PR102061]

2024-08-07 Thread Peter Damianov
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