bugprone-virtual-near-miss

如果一个函数与基类中的虚函数非常相似(即名称非常相似,函数签名相同),则发出警告。

示例

struct Base {
  virtual void func();
};

struct Derived : Base {
  virtual void funk();
  // warning: 'Derived::funk' has a similar name and the same signature as virtual method 'Base::func'; did you mean to override it?
};