public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Alexandre Oliva <aoliva@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/aoliva/heads/testme)] ada: don't map NULL decl to locus Date: Wed, 28 Dec 2022 05:23:49 +0000 (GMT) [thread overview] Message-ID: <20221228052349.33AFF3858409@sourceware.org> (raw) https://gcc.gnu.org/g:00837f548054f9ede8f6956248d7c47fd78a7dfb commit 00837f548054f9ede8f6956248d7c47fd78a7dfb Author: Alexandre Oliva <oliva@adacore.com> Date: Wed Dec 28 02:21:42 2022 -0300 ada: don't map NULL decl to locus When decl is NULL, don't record its mapping in the decl_to_instance_map. for gcc/ada/ChangeLog * gcc-interface/trans.cc (Sloc_to_locus): Don't map NULL decl. Diff: --- gcc/ada/gcc-interface/trans.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ada/gcc-interface/trans.cc b/gcc/ada/gcc-interface/trans.cc index 59332f93614..6579ad11cc2 100644 --- a/gcc/ada/gcc-interface/trans.cc +++ b/gcc/ada/gcc-interface/trans.cc @@ -10564,7 +10564,7 @@ Sloc_to_locus (Source_Ptr Sloc, location_t *locus, bool clear_column, *locus = linemap_position_for_line_and_column (line_table, map, line, column); - if (file_map && file_map[file - 1].Instance) + if (decl && file_map && file_map[file - 1].Instance) decl_to_instance_map->put (decl, file_map[file - 1].Instance); return true;
next reply other threads:[~2022-12-28 5:23 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-12-28 5:23 Alexandre Oliva [this message] -- strict thread matches above, loose matches on Subject: below -- 2022-12-23 7:31 [gcc(refs/users/aoliva/heads/testme)] ada: don't map null " Alexandre Oliva
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20221228052349.33AFF3858409@sourceware.org \ --to=aoliva@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).