WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
155017
[check-webkit-style] Added checks for redundant virtual specifiers.
https://bugs.webkit.org/show_bug.cgi?id=155017
Summary
[check-webkit-style] Added checks for redundant virtual specifiers.
Konstantin Tokarev
Reported
2016-03-04 07:12:56 PST
Added 3 new checks related to virtual, override, and final specifiers: 1. When "override" is present, "virtual" is redundant. 2. When "final" is present, "virtual" is redundant. 3. When "final" is present, "override" is redundant. Inspiration was taken from current version of cpplint.py, from which our checker originates, but implementation of these checks is different.
Attachments
Patch
(14.70 KB, patch)
2016-03-04 07:15 PST
,
Konstantin Tokarev
no flags
Details
Formatted Diff
Diff
Patch
(15.51 KB, patch)
2016-03-04 09:03 PST
,
Konstantin Tokarev
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Konstantin Tokarev
Comment 1
2016-03-04 07:15:43 PST
Created
attachment 272852
[details]
Patch
Konstantin Tokarev
Comment 2
2016-03-04 07:41:41 PST
Comment on
attachment 272852
[details]
Patch This patch does not cover cases when declaration is definition.
Konstantin Tokarev
Comment 3
2016-03-04 09:03:25 PST
Created
attachment 272995
[details]
Patch
Darin Adler
Comment 4
2016-03-04 09:08:21 PST
(In reply to
comment #0
)
> 3. When "final" is present, "override" is redundant.
Is that true? I didn’t realize. Will the code fail to compile if we say final but it’s not an override? My global replace did not try to address this case, but I can do that now too.
Konstantin Tokarev
Comment 5
2016-03-04 09:23:31 PST
Yes, standard says so. I've also checked clang 3.7 and g++ 4.8.
WebKit Commit Bot
Comment 6
2016-03-04 09:58:42 PST
Comment on
attachment 272995
[details]
Patch Clearing flags on attachment: 272995 Committed
r197567
: <
http://trac.webkit.org/changeset/197567
>
WebKit Commit Bot
Comment 7
2016-03-04 09:58:46 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug