public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-2315] use diagnostic location in diagnostic_report_current_function
@ 2021-07-15 5:11 Trevor Saunders
0 siblings, 0 replies; only message in thread
From: Trevor Saunders @ 2021-07-15 5:11 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:329769b72001dcca18a120ab751f58de1b716ff8
commit r12-2315-g329769b72001dcca18a120ab751f58de1b716ff8
Author: Trevor Saunders <tbsaunde@tbsaunde.org>
Date: Wed Jul 7 21:30:03 2021 -0400
use diagnostic location in diagnostic_report_current_function
It appears that input_location was used here before the diagnostic's location
was available, and never updated, when the other part of the header was added
that uses it, so this makes it consistent.
gcc/ChangeLog:
* tree-diagnostic.c (diagnostic_report_current_function): Use the
diagnostic's location, not input_location.
Signed-off-by: Trevor Saunders <tbsaunde@tbsaunde.org>
Diff:
---
gcc/tree-diagnostic.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gcc/tree-diagnostic.c b/gcc/tree-diagnostic.c
index 8bb214b2cf5..705da94637d 100644
--- a/gcc/tree-diagnostic.c
+++ b/gcc/tree-diagnostic.c
@@ -36,9 +36,9 @@ void
diagnostic_report_current_function (diagnostic_context *context,
diagnostic_info *diagnostic)
{
- diagnostic_report_current_module (context, diagnostic_location (diagnostic));
- lang_hooks.print_error_function (context, LOCATION_FILE (input_location),
- diagnostic);
+ location_t loc = diagnostic_location (diagnostic);
+ diagnostic_report_current_module (context, loc);
+ lang_hooks.print_error_function (context, LOCATION_FILE (loc), diagnostic);
}
static void
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-07-15 5:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-15 5:11 [gcc r12-2315] use diagnostic location in diagnostic_report_current_function Trevor Saunders
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).