diff options
author | David Malcolm <dmalcolm@redhat.com> | 2022-05-23 15:08:13 -0400 |
---|---|---|
committer | David Malcolm <dmalcolm@redhat.com> | 2022-05-23 15:08:13 -0400 |
commit | 2ac1459f044ee5a6ec5aee53a87fd3b8974a77f5 (patch) | |
tree | 417f566ad56850fdf74e4624cfe45b4eec29f889 /gcc/analyzer/sm-malloc.cc | |
parent | a239aff82c3771242d957c0f744cf62b42ed2f2a (diff) | |
download | gcc-2ac1459f044ee5a6ec5aee53a87fd3b8974a77f5.zip gcc-2ac1459f044ee5a6ec5aee53a87fd3b8974a77f5.tar.gz gcc-2ac1459f044ee5a6ec5aee53a87fd3b8974a77f5.tar.bz2 |
analyzer: use 'final' and 'override' where appropriate
gcc/analyzer/ChangeLog:
* call-info.cc: Add "final" and "override" to all vfunc
implementations that were missing them, as appropriate.
* engine.cc: Likewise.
* region-model.cc: Likewise.
* sm-malloc.cc: Likewise.
* supergraph.h: Likewise.
* svalue.cc: Likewise.
* varargs.cc: Likewise.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diffstat (limited to 'gcc/analyzer/sm-malloc.cc')
-rw-r--r-- | gcc/analyzer/sm-malloc.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/analyzer/sm-malloc.cc b/gcc/analyzer/sm-malloc.cc index abdce6b..3c0f890 100644 --- a/gcc/analyzer/sm-malloc.cc +++ b/gcc/analyzer/sm-malloc.cc @@ -1015,7 +1015,8 @@ public: const char *get_kind () const final override { return "possible_null_arg"; } - bool subclass_equal_p (const pending_diagnostic &base_other) const + bool subclass_equal_p (const pending_diagnostic &base_other) + const final override { const possible_null_arg &sub_other = (const possible_null_arg &)base_other; @@ -1119,7 +1120,8 @@ public: const char *get_kind () const final override { return "null_arg"; } - bool subclass_equal_p (const pending_diagnostic &base_other) const + bool subclass_equal_p (const pending_diagnostic &base_other) + const final override { const null_arg &sub_other = (const null_arg &)base_other; |