loplugin:unnecessaryoverride look for more patterns
like bool Foo::bar() { b = Super::bar(); return b; } Change-Id: I5e4c8005a3da7d7487c9039c35dcbb1d17e65bd7 Reviewed-on: https://gerrit.libreoffice.org/68418 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -177,4 +177,17 @@ struct Derived5 : public Base5_1, public Base5_2
|
||||
void f1() { Base5_1::f1(); } // no warning expected
|
||||
};
|
||||
|
||||
struct Base6_1
|
||||
{
|
||||
bool f1();
|
||||
};
|
||||
struct Derived6 : public Base6_1
|
||||
{
|
||||
bool
|
||||
f1() // expected-error {{public function just calls public parent [loplugin:unnecessaryoverride]}}
|
||||
{
|
||||
bool ret = Base6_1::f1();
|
||||
return ret;
|
||||
}
|
||||
};
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
|
||||
|
Reference in New Issue
Block a user