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

Issue 12746010: Implement clang tool that converts std::string("") to std::string(). (Closed)

Created:
7 years, 9 months ago by dcheng
Modified:
7 years, 8 months ago
Reviewers:
Nico, klimek
CC:
chromium-reviews, eugenis+clang_chromium.org, Dai Mikurube (NOT FULLTIME), glider+clang_chromium.org, glotov+watch_chromium.org, ukai+watch_chromium.org, djasper_google.com, tfarina
Visibility:
Public.

Description

Implement clang tool that converts std::string("") to std::string(). This is intended to be a simple demo of the clang tools functionality. BUG= Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=191936

Patch Set 1 #

Patch Set 2 : Now it works #

Patch Set 3 : Cleanup #

Patch Set 4 : Now with a half-working helper script. #

Patch Set 5 : Rough draft #

Patch Set 6 : Fix some bugs in run_tool.py #

Patch Set 7 : Whee #

Total comments: 14

Patch Set 8 : Hopefully less silly. #

Patch Set 9 : Hopefully less silly. #

Patch Set 10 : ... #

Patch Set 11 : Update tool and rewriter to handle initializers. #

Total comments: 4

Patch Set 12 : Fix comment typo #

Patch Set 13 : Makefile and update.sh tweaks #

Patch Set 14 : More script cleanup #

Total comments: 13

Patch Set 15 : Incorporate some feedback. #

Patch Set 16 : A test harness. #

Patch Set 17 : Remove debugging print and add comment. #

Total comments: 1

Patch Set 18 : Moar comments. #

Patch Set 19 : Add copyright boilerplate to test files. Yay. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+706 lines, -2 lines) Patch
A tools/clang/empty_string/EmptyStringConverter.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +196 lines, -0 lines 1 comment Download
A tools/clang/empty_string/Makefile View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +23 lines, -0 lines 0 comments Download
A tools/clang/empty_string/tests/test-expected.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +38 lines, -0 lines 0 comments Download
A tools/clang/empty_string/tests/test-original.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +38 lines, -0 lines 0 comments Download
A tools/clang/scripts/run_tool.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +282 lines, -0 lines 0 comments Download
A tools/clang/scripts/test_tool.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +114 lines, -0 lines 0 comments Download
M tools/clang/scripts/update.sh View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +15 lines, -2 lines 0 comments Download

Messages

Total messages: 32 (0 generated)
dcheng
Hey Nico, What do you think of the basic approach in this CL? The tool ...
7 years, 9 months ago (2013-03-27 04:21:02 UTC) #1
Nico
Thanks for working on this! https://codereview.chromium.org/12746010/diff/12001/tools/clang/empty_string/EmptyStringConverter.cpp File tools/clang/empty_string/EmptyStringConverter.cpp (right): https://codereview.chromium.org/12746010/diff/12001/tools/clang/empty_string/EmptyStringConverter.cpp#newcode19 tools/clang/empty_string/EmptyStringConverter.cpp:19: // TODO(dcheng): Figure out ...
7 years, 9 months ago (2013-03-27 16:35:29 UTC) #2
dcheng
https://codereview.chromium.org/12746010/diff/12001/tools/clang/empty_string/EmptyStringConverter.cpp File tools/clang/empty_string/EmptyStringConverter.cpp (right): https://codereview.chromium.org/12746010/diff/12001/tools/clang/empty_string/EmptyStringConverter.cpp#newcode19 tools/clang/empty_string/EmptyStringConverter.cpp:19: // TODO(dcheng): Figure out copyright blobs... On 2013/03/27 16:35:29, ...
7 years, 9 months ago (2013-03-28 00:10:17 UTC) #3
Nico
This is looking great. Should we ask klimek@ for feedback on this? (He's the google-internal ...
7 years, 8 months ago (2013-03-29 22:30:35 UTC) #4
dcheng
This is actually modeled on some other tools I've worked on/written, so I think we ...
7 years, 8 months ago (2013-03-29 22:42:55 UTC) #5
dcheng
I've added Klimek@ as a reviewer.
7 years, 8 months ago (2013-04-01 07:08:32 UTC) #6
Nico
This looks good as far as I can tell, but I'm not a matcher expert. ...
7 years, 8 months ago (2013-04-01 16:19:35 UTC) #7
klimek
One of the things that happen when we're not fast enough on the upstream track ...
7 years, 8 months ago (2013-04-01 16:30:33 UTC) #8
Nico
On 2013/04/01 16:30:33, klimek wrote: > One of the things that happen when we're not ...
7 years, 8 months ago (2013-04-01 16:33:40 UTC) #9
klimek
On Mon, Apr 1, 2013 at 6:33 PM, <thakis@chromium.org> wrote: > On 2013/04/01 16:30:33, klimek ...
7 years, 8 months ago (2013-04-01 16:38:35 UTC) #10
Nico
On Mon, Apr 1, 2013 at 9:38 AM, Manuel Klimek <klimek@google.com> wrote: > On Mon, ...
7 years, 8 months ago (2013-04-01 16:41:06 UTC) #11
klimek
On Mon, Apr 1, 2013 at 6:41 PM, Nico Weber <thakis@chromium.org> wrote: > On Mon, ...
7 years, 8 months ago (2013-04-01 16:44:30 UTC) #12
djasper_google.com
So, I might have gotten the earlier mail thread with Daniel wrong, but what is ...
7 years, 8 months ago (2013-04-01 16:46:30 UTC) #13
Nico
On Mon, Apr 1, 2013 at 9:46 AM, Daniel Jasper <djasper@google.com> wrote: > So, I ...
7 years, 8 months ago (2013-04-01 16:50:56 UTC) #14
klimek
On Mon, Apr 1, 2013 at 6:50 PM, Nico Weber <thakis@chromium.org> wrote: > On Mon, ...
7 years, 8 months ago (2013-04-01 16:53:34 UTC) #15
djasper_google.com
Well, I had not taken a look at the recent changelist. However, it seems to ...
7 years, 8 months ago (2013-04-01 17:09:08 UTC) #16
Nico
On Mon, Apr 1, 2013 at 10:09 AM, Daniel Jasper <djasper@google.com> wrote: > Well, I ...
7 years, 8 months ago (2013-04-01 17:25:38 UTC) #17
klimek
On Mon, Apr 1, 2013 at 7:25 PM, Nico Weber <thakis@chromium.org> wrote: > On Mon, ...
7 years, 8 months ago (2013-04-01 17:26:21 UTC) #18
djasper_google.com
Last I checked, dcheng is a Googler :-). On Mon, Apr 1, 2013 at 7:26 ...
7 years, 8 months ago (2013-04-01 17:28:09 UTC) #19
Nico
Right, but chromium is generally an open-source project. Also, most chromium engineers aren't very familiar ...
7 years, 8 months ago (2013-04-01 17:31:28 UTC) #20
dcheng
On 2013/04/01 17:28:09, djasper_google.com wrote: > Last I checked, dcheng is a Googler :-). > ...
7 years, 8 months ago (2013-04-01 17:33:59 UTC) #21
djasper_google.com
Nico: I know that there are a lot of open-source developers. Hence my question regarding ...
7 years, 8 months ago (2013-04-01 18:01:08 UTC) #22
dcheng
I'm working on adding tests as well. I'll upload those in a bit. To try ...
7 years, 8 months ago (2013-04-01 20:11:30 UTC) #23
djasper_google.com
On Mon, Apr 1, 2013 at 10:11 PM, <dcheng@chromium.org> wrote: > I'm working on adding ...
7 years, 8 months ago (2013-04-01 21:06:38 UTC) #24
dcheng
PTAL. The big changes: - Updated list element deletion logic. The previous version incorrectly handled ...
7 years, 8 months ago (2013-04-02 21:32:32 UTC) #25
Nico
lgtm! https://codereview.chromium.org/12746010/diff/74002/tools/clang/empty_string/EmptyStringConverter.cpp File tools/clang/empty_string/EmptyStringConverter.cpp (right): https://codereview.chromium.org/12746010/diff/74002/tools/clang/empty_string/EmptyStringConverter.cpp#newcode8 tools/clang/empty_string/EmptyStringConverter.cpp:8: // should be run using the tools/clang/scripts/run_tool.py helper. ...
7 years, 8 months ago (2013-04-02 21:37:29 UTC) #26
dcheng
Committed patchset #19 manually as r191936 (presubmit successful).
7 years, 8 months ago (2013-04-02 23:47:09 UTC) #27
tfarina
https://codereview.chromium.org/12746010/diff/82002/tools/clang/empty_string/EmptyStringConverter.cpp File tools/clang/empty_string/EmptyStringConverter.cpp (right): https://codereview.chromium.org/12746010/diff/82002/tools/clang/empty_string/EmptyStringConverter.cpp#newcode99 tools/clang/empty_string/EmptyStringConverter.cpp:99: const auto& constructor_call = Unfortunatelly I got the following ...
7 years, 8 months ago (2013-04-08 01:17:37 UTC) #28
dcheng
On 2013/04/08 01:17:37, tfarina wrote: > https://codereview.chromium.org/12746010/diff/82002/tools/clang/empty_string/EmptyStringConverter.cpp > File tools/clang/empty_string/EmptyStringConverter.cpp (right): > > https://codereview.chromium.org/12746010/diff/82002/tools/clang/empty_string/EmptyStringConverter.cpp#newcode99 > ...
7 years, 8 months ago (2013-04-08 02:32:38 UTC) #29
tfarina
Should we add this to chrome-plugin? Otherwise people will keep using it: https://codereview.chromium.org/14146006/diff/1/chrome/browser/sync_file_system/drive_file_sync_client.cc#newcode188
7 years, 8 months ago (2013-04-19 01:24:51 UTC) #30
Nico
I don't think that's a problem. From what I understand this is just a proof ...
7 years, 8 months ago (2013-04-19 02:41:02 UTC) #31
dcheng
7 years, 8 months ago (2013-04-19 05:14:52 UTC) #32
Message was sent while issue was closed.
On 2013/04/19 02:41:02, Nico wrote:
> I don't think that's a problem. From what I understand this is just a proof
> of concept tool and not something that's terribly useful in itself
> (rewriting all existing instances saved something like 10kB).
> 
> 
> On Thu, Apr 18, 2013 at 6:24 PM, <mailto:tfarina@chromium.org> wrote:
> 
> > Should we add this to chrome-plugin?
> >
> > Otherwise people will keep using it:
> >
> > https://codereview.chromium.**org/14146006/diff/1/chrome/**
> >
>
browser/sync_file_system/**drive_file_sync_client.cc#**newcode188<https://codereview.chromium.org/14146006/diff/1/chrome/browser/sync_file_system/drive_file_sync_client.cc#newcode188>
> >
> >
>
https://codereview.chromium.**org/12746010/%3Chttps://codereview.chromium.org...>
> >

When I have spare cycles, I'll look into adapting it for the clang plugin. A
couple people expressed interest in this in
https://codereview.chromium.org/13145003.

Powered by Google App Engine
This is Rietveld 408576698