]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Mark pass_sccopy gate and execute functions as final override
authorMartin Jambor <mjambor@suse.cz>
Wed, 25 Jun 2025 14:53:03 +0000 (16:53 +0200)
committerMartin Jambor <jamborm@gcc.gnu.org>
Wed, 25 Jun 2025 14:53:11 +0000 (16:53 +0200)
It is customary to mark the gate and execute functions of the classes
representing passes as final override but this is missing in
pass_sccopy.  This patch adds it which also silences clang warnings
about it.

gcc/ChangeLog:

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

* gimple-ssa-sccopy.cc (class pass_sccopy): Mark member functions
gate and execute as final override.

gcc/gimple-ssa-sccopy.cc

index c93374572a9ef4ef5ade088342f41f35582eede4..341bae46080bce79be613b0d4d31209f69516bfa 100644 (file)
@@ -699,8 +699,8 @@ public:
   {}
 
   /* opt_pass methods: */
-  virtual bool gate (function *) { return true; }
-  virtual unsigned int execute (function *);
+  virtual bool gate (function *) final override { return true; }
+  virtual unsigned int execute (function *) final override;
   opt_pass * clone () final override { return new pass_sccopy (m_ctxt); }
 }; // class pass_sccopy