]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
analyzer: fix const-correctness of various is_a_helper
authorDavid Malcolm <dmalcolm@redhat.com>
Thu, 15 Jul 2021 23:33:07 +0000 (19:33 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Thu, 15 Jul 2021 23:33:07 +0000 (19:33 -0400)
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>
gcc/analyzer/svalue.h

index 54b97f8617f286d6cb1abb63f00d5efe56b3f2b6..20d7cf8f7518957c39050d5c84325b839b564aea 100644 (file)
@@ -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;
 }