HomePhabricator

[clang-tidy] Check if grand-..parent's virtual method was called instead of…

Description

[clang-tidy] Check if grand-..parent's virtual method was called instead of overridden parent's.

class A {...int virtual foo() {...}...};
class B: public A {...int foo() override {...}...};
class 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]

Differential Revision: https://reviews.llvm.org/D44295

Details