[Webkit-unassigned] [Bug 74361] check-webkit-style should warn OVERRIDE on destructors

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 12 19:41:25 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=74361





--- Comment #4 from Ryosuke Niwa <rniwa at webkit.org>  2011-12-12 19:41:25 PST ---
(In reply to comment #3)
> In C++11 it's an override like any other.  Destructors having no arguments, and special syntax, makes it rather harder to typo a destructor to not override the inherited destructor, such that "override" provides value in checking for a proper override. But it seems semantically understandable to me.

But we can never "override" destructors in the sense that destructors of superclasses are always called.

> I'm just wondering if I want to tell people not to do this in Mozilla because MSVC won't let you do it, MSVC warns when you do it, or because there's not much point to it.

IMO, it's rather confusing to have "override" keyword on a destructor due to the above semantics (unless adding override keyword changes the behavior of virtual destructors).

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list