[doc] Replace 'class' with 'struct' for 'public' by default

Make sample syntax correct.

llvm-svn: 351867
This commit is contained in:
Zinovy Nis 2019-01-22 20:27:02 +00:00
parent aebb2ee036
commit 1449277fc0
1 changed files with 3 additions and 3 deletions

View File

@ -8,15 +8,15 @@ to overridden parent's virtual methods.
.. code-block:: c++ .. code-block:: c++
class A { struct A {
int virtual foo() {...} int virtual foo() {...}
}; };
class B: public A { struct B: public A {
int foo() override {...} int foo() override {...}
}; };
class C: public B { struct C: public B {
int foo() override { A::foo(); } int foo() override { A::foo(); }
// ^^^^^^^^ // ^^^^^^^^
// warning: qualified name A::foo refers to a member overridden in subclass; did you mean 'B'? [bugprone-parent-virtual-call] // warning: qualified name A::foo refers to a member overridden in subclass; did you mean 'B'? [bugprone-parent-virtual-call]