aboutsummaryrefslogtreecommitdiff
path: root/clang-tools-extra/docs/clang-tidy/checks/misc/override-with-different-visibility.rst
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/docs/clang-tidy/checks/misc/override-with-different-visibility.rst')
-rw-r--r--clang-tools-extra/docs/clang-tidy/checks/misc/override-with-different-visibility.rst13
1 files changed, 7 insertions, 6 deletions
diff --git a/clang-tools-extra/docs/clang-tidy/checks/misc/override-with-different-visibility.rst b/clang-tools-extra/docs/clang-tidy/checks/misc/override-with-different-visibility.rst
index 310bfe2..9958df5 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/misc/override-with-different-visibility.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/misc/override-with-different-visibility.rst
@@ -5,11 +5,12 @@ misc-override-with-different-visibility
Finds virtual function overrides with different visibility than the function
in the base class. 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. The check applies to
-any normal virtual function and optionally to destructors or operators. Use of
-the ``using`` keyword is not considered as visibility change by this check.
+``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. The
+check applies to any normal virtual function and optionally to destructors or
+operators. Use of the ``using`` keyword is not considered as visibility
+change by this check.
.. code-block:: c++
@@ -20,7 +21,7 @@ the ``using`` keyword is not considered as visibility change by this check.
private:
virtual void f_priv();
};
-
+
class B: public A {
public:
void f_priv(); // warning: changed visibility from private to public