]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
value-relation.h: Mark dom_oracle::next_relation as override
authorMartin Jambor <mjambor@suse.cz>
Wed, 25 Jun 2025 15:03:39 +0000 (17:03 +0200)
committerMartin Jambor <jamborm@gcc.gnu.org>
Wed, 25 Jun 2025 15:03:43 +0000 (17:03 +0200)
When GCC is compiled with clang, it emits a warning that
dom_oracle::next_relation is not marked as override even though it
does override a virtual function of its ancestor.  This patch marks it
as such to silence the warning and for the sake of consistency.

There are other member functions in the class which are marked as
final override but this particular function is in the protected
section so I decided to just mark it as override.

gcc/ChangeLog:

2025-06-24  Martin Jambor  <mjambor@suse.cz>

* value-relation.h (class dom_oracle): Mark member function
next_relation as override.

gcc/value-relation.h

index 1081877ccca7e219f3747dc14e346f392fde52d2..87f0d856fabd3336f02ab72d1314cbe24787c15d 100644 (file)
@@ -235,7 +235,7 @@ public:
   void dump (FILE *f) const final override;
 protected:
   virtual relation_chain *next_relation (basic_block, relation_chain *,
-                                        tree) const;
+                                        tree) const override;
   bool m_do_trans_p;
   bitmap m_tmp, m_tmp2;
   bitmap m_relation_set;  // Index by ssa-name. True if a relation exists