https://gcc.gnu.org/g:95dd2643dfddbd93a464dbad5f6d33e4d0dff4e1

commit r17-4960-g95dd2643dfddbd93a464dbad5f6d33e4d0dff4e1
Author: Filip Kastl <[email protected]>
Date:   Tue Oct 6 17:50:24 2026 +0200

    analyzer: Add override keyword where it is missing
    
    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]>

Diff:
---
 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 2666c2cd651e..09c3eb5aead8 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 724c1a18d64c..a0d3f15dafe0 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");
   }

Reply via email to