[clang-tools-extra] [clang-tidy] Added check 'bugprone-function-visibility-change' (PR #140086)
via cfe-commits
cfe-commits at lists.llvm.org
Mon May 19 09:18:48 PDT 2025
=?utf-8?q?Balázs_Kéri?= <balazs.keri at ericsson.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/140086 at github.com>
================
@@ -3,10 +3,13 @@
bugprone-function-visibility-change
===================================
-Check changes in visibility of C++ member functions in subclasses. The check
-detects if a virtual function is overridden with a different visibility than in
-the base class declaration. Only normal functions are detected, no constructors,
-operators, conversions or other special functions.
+Checks changes in visibility of C++ member functions in subclasses. This
+includes for example if a virtual function declared as `private` is overridden
+and declared as `public` in a subclass. The detected change is the modification
+of visibility resulting from keywords `public`, `protected`, `private` at
+overridden virtual functions. Use of the `using` keyword is not considered by
----------------
EugeneZelenko wrote:
```suggestion
and declared as ``public`` in a subclass. The detected change is the modification
of visibility resulting from keywords ``public``, ``protected``, ``private`` at
overridden virtual functions. Use of the ``using`` keyword is not considered by
```
https://github.com/llvm/llvm-project/pull/140086
More information about the cfe-commits
mailing list