[webkit-dev] Should overridden methods use 'virtual' keyword in addition to 'override'?
annulen at yandex.ru
Fri Mar 4 09:47:30 PST 2016
04.03.2016, 20:06, "Konstantin Tokarev" <annulen at yandex.ru>:
> 04.03.2016, 16:21, "Konstantin Tokarev" <annulen at yandex.ru>:
>> 03.03.2016, 22:35, "Darin Adler" <darin at apple.com>:
>>> Do we have volunteers to:
>>> 1) update the style guide webpage
>>> 2) update check-webkit-style
>>> 3) physically restrain me from turning do-webcore-rename into a perl script that does this all the code in the entire source tree all at one go, since that would be a bad idea, right?
>> I volunteer for (2).
> Here is my attempt: https://bugs.webkit.org/show_bug.cgi?id=155017
> I've borrowed 'readability/inheritance' name from cpplint.py , from which cpp.py originates. I've also added two more checks, implemented by cpplint.py: avoid "virtual" when there is "final", and avoid "override" when there is "final".
>  https://github.com/google/styleguide/blob/gh-pages/cpplint/cpplint.py
However, this check still has a minor problem: if function declaration is definition, like here:
and patch modifies only first line
+virtual f() override
error is not detected, because checker treats f as unfinished (inside patch borders). However, it should affect other checks as well.
More information about the webkit-dev