public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-2341] analyzer: fix const-correctness of various is_a_helper
@ 2021-07-15 23:33 David Malcolm
0 siblings, 0 replies; only message in thread
From: David Malcolm @ 2021-07-15 23:33 UTC (permalink / raw)
To: gcc-cvs
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;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-07-15 23:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-15 23:33 [gcc r12-2341] analyzer: fix const-correctness of various is_a_helper David Malcolm
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).