From: David Malcolm Date: Thu, 15 Jul 2021 23:33:07 +0000 (-0400) Subject: analyzer: fix const-correctness of various is_a_helper X-Git-Tag: basepoints/gcc-13~5972 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c031ea2782a1873eee5ba82fb114cd87ff831412;p=thirdparty%2Fgcc.git analyzer: fix const-correctness of various is_a_helper gcc/analyzer/ChangeLog: * svalue.h (is_a_helper ::test): Make param and template param const. (is_a_helper ::test): Likewise. (is_a_helper ::test): Likewise. (is_a_helper ::test): Likewise. Signed-off-by: David Malcolm --- diff --git a/gcc/analyzer/svalue.h b/gcc/analyzer/svalue.h index 54b97f8617f2..20d7cf8f7518 100644 --- a/gcc/analyzer/svalue.h +++ b/gcc/analyzer/svalue.h @@ -1063,7 +1063,7 @@ public: template <> template <> inline bool -is_a_helper ::test (svalue *sval) +is_a_helper ::test (const svalue *sval) { return sval->get_kind () == SK_PLACEHOLDER; } @@ -1165,7 +1165,7 @@ public: template <> template <> inline bool -is_a_helper ::test (svalue *sval) +is_a_helper ::test (const svalue *sval) { return sval->get_kind () == SK_WIDENING; } @@ -1266,7 +1266,7 @@ public: template <> template <> inline bool -is_a_helper ::test (svalue *sval) +is_a_helper ::test (const svalue *sval) { return sval->get_kind () == SK_COMPOUND; } @@ -1366,7 +1366,7 @@ public: template <> template <> inline bool -is_a_helper ::test (svalue *sval) +is_a_helper ::test (const svalue *sval) { return sval->get_kind () == SK_CONJURED; }