From: David Malcolm Date: Mon, 28 Sep 2020 20:59:15 +0000 (-0400) Subject: analyzer: add some missing FINAL OVERRIDEs X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c0ed6afef7897f32dc199da9a5430664fcbb61bb;p=gcc.git analyzer: add some missing FINAL OVERRIDEs Spotted by cppcheck. gcc/analyzer/ChangeLog: * region-model.h (binop_svalue::dyn_cast_binop_svalue): Remove redundant "virtual". Add FINAL OVERRIDE. (widening_svalue::dyn_cast_widening_svalue): Add FINAL OVERRIDE. (compound_svalue::dyn_cast_compound_svalue): Likewise. (conjured_svalue::dyn_cast_conjured_svalue): Likewise. --- diff --git a/gcc/analyzer/region-model.h b/gcc/analyzer/region-model.h index a61aff2c4b3..cfeac8d6951 100644 --- a/gcc/analyzer/region-model.h +++ b/gcc/analyzer/region-model.h @@ -806,7 +806,10 @@ public: } enum svalue_kind get_kind () const FINAL OVERRIDE { return SK_BINOP; } - virtual const binop_svalue *dyn_cast_binop_svalue () const { return this; } + const binop_svalue *dyn_cast_binop_svalue () const FINAL OVERRIDE + { + return this; + } void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE; void accept (visitor *v) const FINAL OVERRIDE; @@ -1067,7 +1070,10 @@ public: } enum svalue_kind get_kind () const FINAL OVERRIDE { return SK_WIDENING; } - const widening_svalue *dyn_cast_widening_svalue () const { return this; } + const widening_svalue *dyn_cast_widening_svalue () const FINAL OVERRIDE + { + return this; + } void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE; void accept (visitor *v) const FINAL OVERRIDE; @@ -1158,7 +1164,10 @@ public: compound_svalue (tree type, const binding_map &map); enum svalue_kind get_kind () const FINAL OVERRIDE { return SK_COMPOUND; } - const compound_svalue *dyn_cast_compound_svalue () const { return this; } + const compound_svalue *dyn_cast_compound_svalue () const FINAL OVERRIDE + { + return this; + } void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE; void accept (visitor *v) const FINAL OVERRIDE; @@ -1263,7 +1272,10 @@ public: } enum svalue_kind get_kind () const FINAL OVERRIDE { return SK_CONJURED; } - const conjured_svalue *dyn_cast_conjured_svalue () const { return this; } + const conjured_svalue *dyn_cast_conjured_svalue () const FINAL OVERRIDE + { + return this; + } void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE; void accept (visitor *v) const FINAL OVERRIDE;