[clang-tools-extra] [clang-tidy] New bugprone-method-hiding check (PR #154746)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 27 01:55:37 PDT 2025
================
@@ -0,0 +1,10 @@
+.. title:: clang-tidy - bugprone-method-hiding
+
+bugprone-method-hiding
+=========================
+
+Finds derived class methods that hide a (non-virtual) base class method.
+
+In order to be considered "hiding", methods must have the same signature
+(i.e. the same name, same number of parameters, same parameter types, etc).
+Only checks public, non-templated methods.
----------------
t-a-james wrote:
I've given an example of `bad` and some recommended fixes, because the examples of `good` are trivial.
https://github.com/llvm/llvm-project/pull/154746
More information about the cfe-commits
mailing list