Clang produces -Winconsistent-missing-override for some member functions
in the static analyzer.  This patch adds the override keyword for those
functions.  This has no effect on functionality.

Pushed as obvious.

gcc/analyzer/ChangeLog:

        * region-model.cc: Add some missing override keywords for member
        functions.
        * shift-diagnostics.cc: Ditto.

Signed-off-by: Filip Kastl <[email protected]>
---
 gcc/analyzer/region-model.cc      | 3 ++-
 gcc/analyzer/shift-diagnostics.cc | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/gcc/analyzer/region-model.cc b/gcc/analyzer/region-model.cc
index 2666c2cd651..09c3eb5aead 100644
--- a/gcc/analyzer/region-model.cc
+++ b/gcc/analyzer/region-model.cc
@@ -941,7 +941,7 @@ public:
   }
 
   void
-  mark_interesting_stuff (interesting_t *interest)
+  mark_interesting_stuff (interesting_t *interest) override
   {
     interest->add_read_region (m_divisor_reg, "divisor zero value");
   }
@@ -950,6 +950,7 @@ public:
   add_function_entry_event (const exploded_edge &eedge,
                            checker_path *emission_path,
                            const state_transition_at_call *state_trans)
+                           override
   {
     class custom_function_entry_event : public function_entry_event
     {
diff --git a/gcc/analyzer/shift-diagnostics.cc 
b/gcc/analyzer/shift-diagnostics.cc
index 724c1a18d64..a0d3f15dafe 100644
--- a/gcc/analyzer/shift-diagnostics.cc
+++ b/gcc/analyzer/shift-diagnostics.cc
@@ -72,7 +72,7 @@ public:
   }
 
   void
-  mark_interesting_stuff (interesting_t *interest)
+  mark_interesting_stuff (interesting_t *interest) override
   {
     interest->add_read_region (m_src_region, "shift count value");
   }
@@ -141,7 +141,7 @@ public:
   }
 
   void
-  mark_interesting_stuff (interesting_t *interest)
+  mark_interesting_stuff (interesting_t *interest) override
   {
     interest->add_read_region (m_src_region, "shift count value");
   }
-- 
2.55.0

Reply via email to