[clang-tools-extra] [clang-tidy] New bugprone-method-hiding check (PR #154746)
Baranov Victor via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 27 09:48:50 PDT 2025
================
@@ -0,0 +1,30 @@
+.. 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.
+
+The below example is bugprone because consumers of the `Derived` class will
----------------
vbvictor wrote:
There is job https://github.com/llvm/llvm-project/actions/runs/17271392237/job/49022556670?pr=154746 but you can also build locally if you: install sphinx, enable it in cmake via LLVM_ENABLE_SPHINX and build target docs-clang-tools-html.
https://clang.llvm.org/extra/clang-tidy/Contributing.html#documenting-your-check
https://github.com/llvm/llvm-project/pull/154746
More information about the cfe-commits
mailing list