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

Issue 10407057: Optionally check base classes for refcounting issues (Closed)

Created:
8 years, 7 months ago by Ryan Sleevi
Modified:
7 years, 10 months ago
Reviewers:
Nico
CC:
chromium-reviews, fischman+watch_chromium.org, glotov+watch_chromium.org, pam+watch_chromium.org, ukai+watch_chromium.org
Visibility:
Public.

Description

Update the Chromium style checker plugin so that it can scan the entire public class hierarchy for ref-counting problems. This is to detect situations where a RefCounted type implements some Delegate-type class and the Delegate may be directly deleted, even if the RefCounted type may not be. Also removed unused flag -skip-refcounted-dtors while here BUG=123295 TEST=tools/clang/plugins/tests/test.sh Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=180077

Patch Set 1 #

Patch Set 2 : Remove local debug cruft #

Patch Set 3 : Fix typo #

Patch Set 4 : Merge into one AST pass #

Total comments: 14

Patch Set 5 : Rebased to HEAD #

Patch Set 6 : Rebased and with code move hidden #

Patch Set 7 : Review feedback #

Patch Set 8 : Add unittest with per-test flags #

Total comments: 1

Patch Set 9 : Review feedback #

Patch Set 10 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+424 lines, -79 lines) Patch
M tools/clang/plugins/FindBadConstructs.cpp View 1 2 3 4 5 6 7 8 9 8 chunks +237 lines, -72 lines 0 comments Download
M tools/clang/plugins/tests/base_refcounted.h View 3 chunks +88 lines, -0 lines 0 comments Download
A tools/clang/plugins/tests/base_refcounted.flags View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M tools/clang/plugins/tests/base_refcounted.txt View 1 2 3 4 5 6 7 1 chunk +92 lines, -5 lines 0 comments Download
M tools/clang/plugins/tests/test.sh View 1 2 3 4 5 6 7 2 chunks +6 lines, -2 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
Ryan Sleevi
Nico: Mind taking a look? I know Elliot is listed in OWNERS, but I thought ...
8 years, 7 months ago (2012-05-20 08:29:14 UTC) #1
Ryan Sleevi
ping
8 years, 6 months ago (2012-05-31 23:12:20 UTC) #2
Nico
Why does this require a new plugin?
8 years, 6 months ago (2012-05-31 23:13:39 UTC) #3
Ryan Sleevi
On 2012/05/31 23:13:39, Nico wrote: > Why does this require a new plugin? It doesn't, ...
8 years, 6 months ago (2012-05-31 23:18:44 UTC) #4
Nico
On 2012/05/31 23:18:44, Ryan Sleevi wrote: > On 2012/05/31 23:13:39, Nico wrote: > > Why ...
8 years, 6 months ago (2012-05-31 23:25:31 UTC) #5
Ryan Sleevi
> It makes sense to move this to a new file if it's getting big, ...
8 years, 6 months ago (2012-05-31 23:30:45 UTC) #6
Ryan Sleevi
Nico: Mind taking another stab? Ignore the .submodules issue, it's yet another point of pain ...
8 years, 5 months ago (2012-07-08 23:44:50 UTC) #7
Ryan Sleevi
ping
8 years, 5 months ago (2012-07-20 00:23:43 UTC) #8
Nico
Looks pretty good as far as I can tell. http://codereview.chromium.org/10407057/diff/11001/tools/clang/plugins/FindBadConstructs.cpp File tools/clang/plugins/FindBadConstructs.cpp (left): http://codereview.chromium.org/10407057/diff/11001/tools/clang/plugins/FindBadConstructs.cpp#oldcode144 tools/clang/plugins/FindBadConstructs.cpp:144: ...
8 years, 5 months ago (2012-07-21 18:36:36 UTC) #9
Ryan Sleevi
Nico: Care to take another pass now? Note I've updated the unittests with the ability ...
7 years, 11 months ago (2013-01-26 07:33:47 UTC) #10
Ryan Sleevi
ping
7 years, 10 months ago (2013-01-31 02:14:34 UTC) #11
Nico
Still looks pretty good. https://codereview.chromium.org/10407057/diff/11001/tools/clang/plugins/FindBadConstructs.cpp File tools/clang/plugins/FindBadConstructs.cpp (right): https://codereview.chromium.org/10407057/diff/11001/tools/clang/plugins/FindBadConstructs.cpp#newcode400 tools/clang/plugins/FindBadConstructs.cpp:400: DiagnosticsEngine::Level getErrorLevel() { On 2012/07/21 ...
7 years, 10 months ago (2013-01-31 22:52:20 UTC) #12
Ryan Sleevi
https://codereview.chromium.org/10407057/diff/11001/tools/clang/plugins/FindBadConstructs.cpp File tools/clang/plugins/FindBadConstructs.cpp (right): https://codereview.chromium.org/10407057/diff/11001/tools/clang/plugins/FindBadConstructs.cpp#newcode400 tools/clang/plugins/FindBadConstructs.cpp:400: DiagnosticsEngine::Level getErrorLevel() { On 2013/01/31 22:52:20, Nico wrote: > ...
7 years, 10 months ago (2013-01-31 23:09:30 UTC) #13
Nico
On 2013/01/31 23:09:30, Ryan Sleevi wrote: > https://codereview.chromium.org/10407057/diff/11001/tools/clang/plugins/FindBadConstructs.cpp > File tools/clang/plugins/FindBadConstructs.cpp (right): > > https://codereview.chromium.org/10407057/diff/11001/tools/clang/plugins/FindBadConstructs.cpp#newcode400 ...
7 years, 10 months ago (2013-01-31 23:11:44 UTC) #14
Ryan Sleevi
https://codereview.chromium.org/10407057/diff/11001/tools/clang/plugins/FindBadConstructs.cpp File tools/clang/plugins/FindBadConstructs.cpp (right): https://codereview.chromium.org/10407057/diff/11001/tools/clang/plugins/FindBadConstructs.cpp#newcode400 tools/clang/plugins/FindBadConstructs.cpp:400: DiagnosticsEngine::Level getErrorLevel() { On 2013/01/31 23:09:30, Ryan Sleevi wrote: ...
7 years, 10 months ago (2013-02-01 00:19:36 UTC) #15
Nico
lgtm, thanks for checking. Maybe that's worth a comment somewhere. https://codereview.chromium.org/10407057/diff/33001/tools/clang/plugins/FindBadConstructs.cpp File tools/clang/plugins/FindBadConstructs.cpp (right): https://codereview.chromium.org/10407057/diff/33001/tools/clang/plugins/FindBadConstructs.cpp#newcode584 ...
7 years, 10 months ago (2013-02-01 00:24:32 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rsleevi@chromium.org/10407057/36001
7 years, 10 months ago (2013-02-01 01:12:35 UTC) #17
commit-bot: I haz the power
Failed to apply patch for tools/clang/plugins/FindBadConstructs.cpp: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 10 months ago (2013-02-01 01:12:37 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rsleevi@chromium.org/10407057/39001
7 years, 10 months ago (2013-02-01 01:30:32 UTC) #19
commit-bot: I haz the power
7 years, 10 months ago (2013-02-01 05:09:16 UTC) #20
Message was sent while issue was closed.
Change committed as 180077

Powered by Google App Engine
This is Rietveld 408576698