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

Issue 751233002: Switch the Clang plugin to use RecursiveASTVisitor. (Closed)

Created:
6 years ago by dcheng
Modified:
5 years, 11 months ago
Reviewers:
Nico, brucedawson
CC:
chromium-reviews, Elliot Glaysher
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement the Clang plugin as a RecursiveASTVisitor. The current ASTConsumer class checker can be non-deterministic in its class verification. The exact reason isn't clear, but it's kind of nice to have a deterministic checker. Using RecursiveASTVisitor also makes it easier to write more interesting checks if needed in the future, since it also visits statements, etc. Since the RecursiveASTVisitor implementation catches strictly more things than the ASTConsumer version, it's gated behind a flag. This flag/the legacy ASTConsumer version will be removed once Chromium code can compile cleanly with the AST visitor. BUG=436357 Committed: https://crrev.com/80f54dc1ab629289946237227e5706e19b7e7594 Cr-Commit-Position: refs/heads/master@{#310331}

Patch Set 1 #

Patch Set 2 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -4 lines) Patch
M tools/clang/plugins/ChromeClassTester.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M tools/clang/plugins/FindBadConstructsAction.cpp View 1 3 chunks +22 lines, -0 lines 0 comments Download
D tools/clang/plugins/FindBadConstructsConsumer.h View 1 2 chunks +7 lines, -1 line 0 comments Download
D tools/clang/plugins/FindBadConstructsConsumer.cpp View 1 1 chunk +7 lines, -0 lines 0 comments Download
M tools/clang/plugins/Options.h View 1 1 chunk +3 lines, -1 line 0 comments Download
M tools/clang/plugins/tests/test.sh View 1 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (3 generated)
dcheng
I don't know how interested we are in this. Maybe the current behavior is fine; ...
6 years ago (2014-12-23 00:21:40 UTC) #2
Nico
Won't the RAV visit all substatements of a decl? Does this have any build time ...
6 years ago (2014-12-23 00:25:47 UTC) #3
dcheng
We could probably get it to short-circuit out by returning false in VisitStmt(). Let me ...
6 years ago (2014-12-23 00:27:33 UTC) #4
dcheng
My highly scientific testing method required commenting out the warnings we'd normally emit for inline ...
6 years ago (2014-12-23 21:08:27 UTC) #5
dcheng
Ping =)
5 years, 11 months ago (2015-01-06 19:18:56 UTC) #6
brucedawson
In the description you say "can compile cleanly the AST visitor." -- should that be ...
5 years, 11 months ago (2015-01-06 19:30:25 UTC) #7
brucedawson
I'm not familiar with clang plugins but the code seems clear and reasonable enough. Deferring ...
5 years, 11 months ago (2015-01-06 19:33:58 UTC) #9
dcheng
On 2015/01/06 at 19:30:25, brucedawson wrote: > In the description you say "can compile cleanly ...
5 years, 11 months ago (2015-01-06 19:34:00 UTC) #10
Nico
It's behind a flag, you checked that it doesn't regress build time, and the resident ...
5 years, 11 months ago (2015-01-06 19:48:41 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/751233002/20001
5 years, 11 months ago (2015-01-07 18:13:00 UTC) #13
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 11 months ago (2015-01-07 19:14:17 UTC) #14
commit-bot: I haz the power
5 years, 11 months ago (2015-01-07 19:15:59 UTC) #15
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/80f54dc1ab629289946237227e5706e19b7e7594
Cr-Commit-Position: refs/heads/master@{#310331}

Powered by Google App Engine
This is Rietveld 408576698