Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Issue 597863002: Update plugin to handle new style rules for virtual annotations. (Closed)

Created:
6 years, 3 months ago by dcheng
Modified:
4 years, 4 months ago
CC:
chromium-reviews, Elliot Glaysher
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Update plugin to handle new style rules for virtual specifiers. Implements several new checks in the plugin, gated behind a flag: - Only one of {virtual,override,final} should be ever used. - Destructors must also be annotated correctly. - A virtual final method that doesn't override anything should be devirtualized. The test harness for the Chrome plugin has also been updated to stop it from littering the source tree with object files, and to make the golden files easier to update. BUG=417463 Committed: https://crrev.com/993e04f76665c46336a6c790706d863adf64b49c Cr-Commit-Position: refs/heads/master@{#297129}

Patch Set 1 #

Patch Set 2 : Whee #

Patch Set 3 : And fix a test #

Patch Set 4 : And another warning #

Patch Set 5 : . #

Total comments: 2

Patch Set 6 : New tests, don't exclude virtual dtors anymore #

Patch Set 7 : Clean up tests, fix dtor handling #

Patch Set 8 : Delete another redundant test #

Patch Set 9 : s/annotation/specifier/g #

Total comments: 21

Patch Set 10 : Address comments #

Patch Set 11 : And one more thing... #

Total comments: 3

Patch Set 12 : Fixed #

Patch Set 13 : . #

Patch Set 14 : Add copyright blurb #

Unified diffs Side-by-side diffs Delta from patch set Stats (+363 lines, -211 lines) Patch
M tools/clang/plugins/FindBadConstructsAction.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M tools/clang/plugins/FindBadConstructsConsumer.h View 1 2 3 4 5 6 7 8 9 3 chunks +8 lines, -9 lines 0 comments Download
M tools/clang/plugins/FindBadConstructsConsumer.cpp View 1 2 3 4 5 6 7 8 9 10 11 7 chunks +134 lines, -76 lines 0 comments Download
M tools/clang/plugins/Options.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -1 line 0 comments Download
M tools/clang/plugins/tests/blacklisted_dirs.txt View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -4 lines 0 comments Download
M tools/clang/plugins/tests/overridden_methods.txt View 1 2 3 4 5 6 7 8 9 1 chunk +32 lines, -32 lines 0 comments Download
M tools/clang/plugins/tests/test.sh View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -1 line 0 comments Download
A tools/clang/plugins/tests/virtual_base_method_also_final.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +17 lines, -0 lines 0 comments Download
A tools/clang/plugins/tests/virtual_base_method_also_final.flags View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
A tools/clang/plugins/tests/virtual_base_method_also_final.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +29 lines, -0 lines 0 comments Download
A + tools/clang/plugins/tests/virtual_bodies.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
A + tools/clang/plugins/tests/virtual_bodies.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -4 lines 0 comments Download
A tools/clang/plugins/tests/virtual_bodies.txt View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
D tools/clang/plugins/tests/virtual_methods.h View 1 2 3 4 5 6 1 chunk +0 lines, -39 lines 0 comments Download
D tools/clang/plugins/tests/virtual_methods.cpp View 1 2 3 4 5 6 1 chunk +0 lines, -36 lines 0 comments Download
M tools/clang/plugins/tests/virtual_methods.txt View 1 2 3 4 5 6 1 chunk +0 lines, -9 lines 0 comments Download
A tools/clang/plugins/tests/virtual_specifiers.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +63 lines, -0 lines 0 comments Download
A tools/clang/plugins/tests/virtual_specifiers.flags View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
A tools/clang/plugins/tests/virtual_specifiers.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +51 lines, -0 lines 0 comments Download

Messages

Total messages: 32 (8 generated)
dcheng
I've updated the plugin to implement the proposed style guideline changes in the C++11 feature ...
6 years, 3 months ago (2014-09-24 16:31:02 UTC) #3
Nico
On 2014/09/24 16:31:02, dcheng wrote: > I've updated the plugin to implement the proposed style ...
6 years, 3 months ago (2014-09-24 16:33:42 UTC) #4
Nico
The plan sounds good to me. Maybe rsleevi can look at this, since he worked ...
6 years, 3 months ago (2014-09-24 16:37:02 UTC) #6
dcheng
Adding rsleevi per your suggestion.
6 years, 3 months ago (2014-09-24 17:12:40 UTC) #7
Nico
https://codereview.chromium.org/597863002/diff/80001/tools/clang/plugins/FindBadConstructsConsumer.cpp File tools/clang/plugins/FindBadConstructsConsumer.cpp (right): https://codereview.chromium.org/597863002/diff/80001/tools/clang/plugins/FindBadConstructsConsumer.cpp#newcode30 tools/clang/plugins/FindBadConstructsConsumer.cpp:30: "final; " Once the strict checks are on, we ...
6 years, 3 months ago (2014-09-24 17:38:07 UTC) #8
dcheng
On 2014/09/24 at 16:33:42, thakis wrote: > On 2014/09/24 16:31:02, dcheng wrote: > > I've ...
6 years, 3 months ago (2014-09-24 18:53:12 UTC) #9
dcheng
On 2014/09/24 at 18:53:12, dcheng wrote: > On 2014/09/24 at 16:33:42, thakis wrote: > > ...
6 years, 3 months ago (2014-09-24 20:05:42 UTC) #10
Nico
There's -fixit-recompile, maybe that does The Thing? On Wed, Sep 24, 2014 at 1:05 PM, ...
6 years, 3 months ago (2014-09-24 20:12:03 UTC) #11
dcheng
On 2014/09/24 at 20:05:42, dcheng wrote: > On 2014/09/24 at 18:53:12, dcheng wrote: > > ...
6 years, 3 months ago (2014-09-24 20:12:11 UTC) #12
dcheng
PTAL. I've streamlined the tests and updated the logic to make it apply the same ...
6 years, 3 months ago (2014-09-25 00:12:54 UTC) #13
dcheng
I forgot to add: I have a proof of concept patch to do the rewriting ...
6 years, 3 months ago (2014-09-25 00:13:54 UTC) #14
Nico
Hans, can you look at this maybe? I didn't get to it :-/
6 years, 2 months ago (2014-09-25 21:19:36 UTC) #16
hans
On 2014/09/25 21:19:36, Nico (away until Oct 27) wrote: > Hans, can you look at ...
6 years, 2 months ago (2014-09-25 21:23:22 UTC) #17
hans
https://codereview.chromium.org/597863002/diff/160001/tools/clang/plugins/FindBadConstructsAction.cpp File tools/clang/plugins/FindBadConstructsAction.cpp (right): https://codereview.chromium.org/597863002/diff/160001/tools/clang/plugins/FindBadConstructsAction.cpp#newcode39 tools/clang/plugins/FindBadConstructsAction.cpp:39: } else if (args[0] == "strict-virtual-specifiers") { args[i]? https://codereview.chromium.org/597863002/diff/160001/tools/clang/plugins/FindBadConstructsConsumer.cpp ...
6 years, 2 months ago (2014-09-26 01:29:29 UTC) #18
dcheng
https://codereview.chromium.org/597863002/diff/160001/tools/clang/plugins/FindBadConstructsAction.cpp File tools/clang/plugins/FindBadConstructsAction.cpp (right): https://codereview.chromium.org/597863002/diff/160001/tools/clang/plugins/FindBadConstructsAction.cpp#newcode39 tools/clang/plugins/FindBadConstructsAction.cpp:39: } else if (args[0] == "strict-virtual-specifiers") { On 2014/09/26 ...
6 years, 2 months ago (2014-09-26 07:07:14 UTC) #19
hans
lgtm https://codereview.chromium.org/597863002/diff/160001/tools/clang/plugins/tests/test.sh File tools/clang/plugins/tests/test.sh (right): https://codereview.chromium.org/597863002/diff/160001/tools/clang/plugins/tests/test.sh#newcode47 tools/clang/plugins/tests/test.sh:47: cat > ${2}-actual << EOF On 2014/09/26 07:07:14, ...
6 years, 2 months ago (2014-09-27 00:36:10 UTC) #20
dcheng
https://codereview.chromium.org/597863002/diff/200001/tools/clang/plugins/FindBadConstructsConsumer.cpp File tools/clang/plugins/FindBadConstructsConsumer.cpp (right): https://codereview.chromium.org/597863002/diff/200001/tools/clang/plugins/FindBadConstructsConsumer.cpp#newcode87 tools/clang/plugins/FindBadConstructsConsumer.cpp:87: if (!text.startswith("virtual")) On 2014/09/27 at 00:36:10, hans wrote: > ...
6 years, 2 months ago (2014-09-28 18:35:39 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/597863002/240001
6 years, 2 months ago (2014-09-28 18:36:10 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/14006)
6 years, 2 months ago (2014-09-28 18:42:04 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/597863002/260001
6 years, 2 months ago (2014-09-28 18:49:12 UTC) #27
commit-bot: I haz the power
Committed patchset #14 (id:260001) as c9901d2f15e8d92011a176cd24544dfaa0a18459
6 years, 2 months ago (2014-09-28 19:28:03 UTC) #28
commit-bot: I haz the power
Patchset 14 (id:??) landed as https://crrev.com/993e04f76665c46336a6c790706d863adf64b49c Cr-Commit-Position: refs/heads/master@{#297129}
6 years, 2 months ago (2014-09-28 19:28:44 UTC) #29
twasmundt36
4 years, 4 months ago (2016-08-02 04:12:07 UTC) #31
twasmundt36
4 years, 4 months ago (2016-08-02 04:12:47 UTC) #32
Message was sent while issue was closed.
lgtm

Powered by Google App Engine
This is Rietveld 408576698