HomePhabricator

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

Authored by zinovy.nis on Apr 6 2018, 1:02 PM.

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

llvm-svn: 329448