aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2020-09-28 16:59:15 -0400
committerDavid Malcolm <dmalcolm@redhat.com>2020-09-28 19:52:14 -0400
commitc0ed6afef7897f32dc199da9a5430664fcbb61bb (patch)
tree7bec42682978b44434d09cd3c011d421cead0ee0 /gcc
parent20d16d61dd22a9bfb66d5c4a383d193037e8f16d (diff)
downloadgcc-c0ed6afef7897f32dc199da9a5430664fcbb61bb.zip
gcc-c0ed6afef7897f32dc199da9a5430664fcbb61bb.tar.gz
gcc-c0ed6afef7897f32dc199da9a5430664fcbb61bb.tar.bz2
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.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/analyzer/region-model.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/gcc/analyzer/region-model.h b/gcc/analyzer/region-model.h
index a61aff2..cfeac8d 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;