forked from OSchip/llvm-project
[doc] Replace 'class' with 'struct' for 'public' by default
Make sample syntax correct. llvm-svn: 351867
This commit is contained in:
parent
aebb2ee036
commit
1449277fc0
|
@ -8,15 +8,15 @@ to overridden parent's virtual methods.
|
|||
|
||||
.. code-block:: c++
|
||||
|
||||
class A {
|
||||
struct A {
|
||||
int virtual foo() {...}
|
||||
};
|
||||
|
||||
class B: public A {
|
||||
struct B: public A {
|
||||
int foo() override {...}
|
||||
};
|
||||
|
||||
class C: public B {
|
||||
struct C: public B {
|
||||
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]
|
||||
|
|
Loading…
Reference in New Issue