On Friday 2018-02-16 12:36 -0800, Chris Peterson wrote: > Mozilla's C++ style guide [1] says (since 2015) virtual function > declarations should specify only one of `virtual`, `final`, or `override`. > > Over the weekend, I will land a mach lint check (bug 1436263) that will warn > about some virtual style violations such as: > > virtual void Bad1() final
I think there might be some legitimate use cases for this one, when a function needs to be virtual because it's required for the calling convention (as part of a binary plugin API or binary embedding API, for example), but it's also not to be overridden, and it's also not overriding a virtual function on a base class. While we've moved away from binary plugin interfaces, I could imagine it the definition of an API for embedding Gecko or some part of it. I think it's reasonable to warn for it since the above case should be pretty rare, but I'd be a little concerned about forbidding it completely. -David -- 𝄞 L. David Baron http://dbaron.org/ 𝄂 𝄢 Mozilla https://www.mozilla.org/ 𝄂 Before I built a wall I'd ask to know What I was walling in or walling out, And to whom I was like to give offense. - Robert Frost, Mending Wall (1914)
signature.asc
Description: PGP signature
_______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform