public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: David Malcolm <dmalcolm@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-2341] analyzer: fix const-correctness of various is_a_helper Date: Thu, 15 Jul 2021 23:33:40 +0000 (GMT) [thread overview] Message-ID: <20210715233340.352F0385C40F@sourceware.org> (raw) https://gcc.gnu.org/g:c031ea2782a1873eee5ba82fb114cd87ff831412 commit r12-2341-gc031ea2782a1873eee5ba82fb114cd87ff831412 Author: David Malcolm <dmalcolm@redhat.com> Date: Thu Jul 15 19:33:07 2021 -0400 analyzer: fix const-correctness of various is_a_helper gcc/analyzer/ChangeLog: * svalue.h (is_a_helper <placeholder_svalue *>::test): Make param and template param const. (is_a_helper <widening_svalue *>::test): Likewise. (is_a_helper <compound_svalue *>::test): Likewise. (is_a_helper <conjured_svalue *>::test): Likewise. Signed-off-by: David Malcolm <dmalcolm@redhat.com> Diff: --- gcc/analyzer/svalue.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/analyzer/svalue.h b/gcc/analyzer/svalue.h index 54b97f8617f..20d7cf8f751 100644 --- a/gcc/analyzer/svalue.h +++ b/gcc/analyzer/svalue.h @@ -1063,7 +1063,7 @@ public: template <> template <> inline bool -is_a_helper <placeholder_svalue *>::test (svalue *sval) +is_a_helper <const placeholder_svalue *>::test (const svalue *sval) { return sval->get_kind () == SK_PLACEHOLDER; } @@ -1165,7 +1165,7 @@ public: template <> template <> inline bool -is_a_helper <widening_svalue *>::test (svalue *sval) +is_a_helper <const widening_svalue *>::test (const svalue *sval) { return sval->get_kind () == SK_WIDENING; } @@ -1266,7 +1266,7 @@ public: template <> template <> inline bool -is_a_helper <compound_svalue *>::test (svalue *sval) +is_a_helper <const compound_svalue *>::test (const svalue *sval) { return sval->get_kind () == SK_COMPOUND; } @@ -1366,7 +1366,7 @@ public: template <> template <> inline bool -is_a_helper <conjured_svalue *>::test (svalue *sval) +is_a_helper <const conjured_svalue *>::test (const svalue *sval) { return sval->get_kind () == SK_CONJURED; }
reply other threads:[~2021-07-15 23:33 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20210715233340.352F0385C40F@sourceware.org \ --to=dmalcolm@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).