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

Issue 1557243002: Update rewrite_to_chrome_style tool to also rename methods. (Closed)

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

Description

Update rewrite_to_chrome_style tool to also rename methods. This patch also fixes a bug when the tool renamed expressions involving nested name specifiers: given A::B::C, it incorrectly replaced `A` when it should have replaced `C`. BUG=none Committed: https://crrev.com/e48dd29de357ab9031c6d4e656d6bcefd51cfa40 Cr-Commit-Position: refs/heads/master@{#368445}

Patch Set 1 #

Patch Set 2 : Fix lots of bugs, clean up lots of things. #

Patch Set 3 : Remove superfluous comment #

Patch Set 4 : Group more logically #

Total comments: 12

Patch Set 5 : Fix bad renaming #

Total comments: 3

Patch Set 6 : Address comments #

Patch Set 7 : Add constant test case #

Unified diffs Side-by-side diffs Delta from patch set Stats (+403 lines, -89 lines) Patch
M tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp View 1 2 3 4 5 6 chunks +258 lines, -84 lines 0 comments Download
M tools/clang/rewrite_to_chrome_style/tests/constants-expected.cc View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M tools/clang/rewrite_to_chrome_style/tests/constants-original.cc View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M tools/clang/rewrite_to_chrome_style/tests/fields-expected.cc View 1 2 3 4 2 chunks +10 lines, -3 lines 0 comments Download
M tools/clang/rewrite_to_chrome_style/tests/fields-original.cc View 1 2 3 4 2 chunks +9 lines, -2 lines 0 comments Download
M tools/clang/rewrite_to_chrome_style/tests/functions-expected.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M tools/clang/rewrite_to_chrome_style/tests/functions-original.cc View 1 chunk +4 lines, -0 lines 0 comments Download
A tools/clang/rewrite_to_chrome_style/tests/methods-expected.cc View 1 2 3 4 1 chunk +51 lines, -0 lines 0 comments Download
A tools/clang/rewrite_to_chrome_style/tests/methods-original.cc View 1 2 3 4 1 chunk +51 lines, -0 lines 0 comments Download
M tools/clang/rewrite_to_chrome_style/tests/variables-expected.cc View 1 1 chunk +6 lines, -0 lines 0 comments Download
M tools/clang/rewrite_to_chrome_style/tests/variables-original.cc View 1 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (9 generated)
dcheng
Note: this doesn't currently handle simple getters/setters (which should be named foo() and set_foo() per ...
4 years, 11 months ago (2016-01-06 02:21:52 UTC) #4
dcheng
Probably worth noting that this assumes the bindings generator will change so we don't need ...
4 years, 11 months ago (2016-01-06 03:09:24 UTC) #8
danakj
On 2016/01/06 02:21:52, dcheng wrote: > Note: this doesn't currently handle simple getters/setters (which should ...
4 years, 11 months ago (2016-01-06 21:07:51 UTC) #9
Jeffrey Yasskin
Yep, it sounds like folks want to change the bindings generator instead of having jsCased ...
4 years, 11 months ago (2016-01-06 21:25:23 UTC) #10
danakj
OK I read this as carefully as I could. I think I found 1 bug ...
4 years, 11 months ago (2016-01-06 22:09:40 UTC) #11
dcheng
https://codereview.chromium.org/1557243002/diff/60001/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp File tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp (right): https://codereview.chromium.org/1557243002/diff/60001/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp#newcode11 tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp:11: // const int maxThings => const int kMaxThings On ...
4 years, 11 months ago (2016-01-08 01:41:12 UTC) #12
dcheng
On 2016/01/06 at 21:25:23, jyasskin wrote: > Yep, it sounds like folks want to change ...
4 years, 11 months ago (2016-01-08 01:42:23 UTC) #13
danakj
Looks good, I don't see any tests for constants, am I missing them? https://codereview.chromium.org/1557243002/diff/80001/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp File ...
4 years, 11 months ago (2016-01-08 02:02:52 UTC) #14
dcheng
The tests for constants are already checked in: https://chromium.googlesource.com/chromium/src/+/master/tools/clang/rewrite_to_chrome_style/tests/constants-original.cc https://codereview.chromium.org/1557243002/diff/80001/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp File tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp (right): https://codereview.chromium.org/1557243002/diff/80001/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp#newcode304 tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp:304: ...
4 years, 11 months ago (2016-01-08 02:14:01 UTC) #15
danakj
LGTM
4 years, 11 months ago (2016-01-08 21:06:27 UTC) #16
danakj
On Thu, Jan 7, 2016 at 6:14 PM, <dcheng@chromium.org> wrote: > The tests for constants ...
4 years, 11 months ago (2016-01-08 21:06:34 UTC) #17
dcheng
On 2016/01/08 at 21:06:34, danakj wrote: > On Thu, Jan 7, 2016 at 6:14 PM, ...
4 years, 11 months ago (2016-01-08 21:30:37 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1557243002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1557243002/120001
4 years, 11 months ago (2016-01-08 21:33:08 UTC) #21
danakj
Thanks :)
4 years, 11 months ago (2016-01-08 21:33:46 UTC) #22
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 11 months ago (2016-01-08 22:36:52 UTC) #23
commit-bot: I haz the power
4 years, 11 months ago (2016-01-08 22:37:54 UTC) #25
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/e48dd29de357ab9031c6d4e656d6bcefd51cfa40
Cr-Commit-Position: refs/heads/master@{#368445}

Powered by Google App Engine
This is Rietveld 408576698