================
@@ -0,0 +1,59 @@
+```{title} clang-tidy - readability-redundant-override
+```
+
+# readability-redundant-override
+
+Finds virtual overrides that only forward their arguments to the inherited
+implementation on the same object, without changing its interface.
+
+For example:
+
+```c++
+struct Base {
+  virtual void f() {}
+};
+
+struct Derived : Base {
+  void f() override { Base::f(); }
+};
+```
+
+becomes:
+
+```c++
+struct Base {
+  virtual void f() {}
+};
+
+struct Derived : Base {};
+```
+
+Both inline definitions and out-of-line definitions are supported. When an
+override is declared in a header and defined in a source file, the fix
+removes both declarations. The check skips an override if any declaration
+or definition cannot be safely removed, including shared declarations and
+ranges containing preprocessor directives. It never offers a partial fix.
----------------
EugeneZelenko wrote:

Ditto.

https://github.com/llvm/llvm-project/pull/242955
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to