]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Mitigate clang warnings:
authorMartin Liska <mliska@suse.cz>
Mon, 7 Nov 2022 08:50:21 +0000 (09:50 +0100)
committerMartin Liska <mliska@suse.cz>
Mon, 7 Nov 2022 08:51:14 +0000 (09:51 +0100)
gcc/range-op.cc:1752:16: warning: 'wi_fold' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
gcc/range-op.cc:1757:16: warning: 'wi_op_overflows' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
gcc/range-op.cc:1759:16: warning: 'op1_range' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
gcc/range-op.cc:1763:16: warning: 'op2_range' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
gcc/range-op.cc:1928:16: warning: 'wi_fold' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
gcc/range-op.cc:1933:16: warning: 'wi_op_overflows' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]

gcc/ChangeLog:

* range-op.cc: Add final override keywords.

gcc/range-op.cc

index 25c004d8287d6b2fc9422f9e5dca079f1c6c4fb8..5e94c3d2282ed8e1dfd9f1706d94367abd034535 100644 (file)
@@ -1753,17 +1753,18 @@ public:
                        const wide_int &lh_lb,
                        const wide_int &lh_ub,
                        const wide_int &rh_lb,
-                       const wide_int &rh_ub) const;
+                       const wide_int &rh_ub) const final override;
   virtual bool wi_op_overflows (wide_int &res, tree type,
-                               const wide_int &w0, const wide_int &w1) const;
+                               const wide_int &w0, const wide_int &w1)
+    const final override;
   virtual bool op1_range (irange &r, tree type,
                          const irange &lhs,
                          const irange &op2,
-                         relation_trio) const;
+                         relation_trio) const final override;
   virtual bool op2_range (irange &r, tree type,
                          const irange &lhs,
                          const irange &op1,
-                         relation_trio) const;
+                         relation_trio) const final override;
 } op_mult;
 
 bool
@@ -1929,9 +1930,10 @@ public:
                        const wide_int &lh_lb,
                        const wide_int &lh_ub,
                        const wide_int &rh_lb,
-                       const wide_int &rh_ub) const;
+                       const wide_int &rh_ub) const final override;
   virtual bool wi_op_overflows (wide_int &res, tree type,
-                               const wide_int &, const wide_int &) const;
+                               const wide_int &, const wide_int &)
+    const final override;
   virtual bool fold_range (irange &r, tree type,
                           const irange &lh, const irange &rh,
                           relation_trio trio) const final override;