Kaydet (Commit) f2b4d849 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Fix loplugin:unnecessaryoverride

(user-provided virtual dtor in class with dependent base)

Change-Id: I37b3cc3d32e76a0286ecc91f999920e3dfe706cc
üst 6e4d3bad
......@@ -46,6 +46,10 @@ struct MarkedInlineButNotDefined {
inline ~MarkedInlineButNotDefined();
};
template<typename T> struct TemplateBase: T {
virtual ~TemplateBase() {}
};
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
......@@ -143,6 +143,10 @@ bool UnnecessaryOverride::VisitCXXMethodDecl(const CXXMethodDecl* methodDecl)
return true;
}
}
else
{
return true; // dependent base
}
}
}
// corner case
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment