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

Issue 1534793004: Update the Pass→std::move() tool to handle nested calls to Pass(). (Closed)

Created:
5 years ago by dcheng
Modified:
5 years ago
Reviewers:
danakj, Nico
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 the Pass→std::move() tool to handle nested calls to Pass(). The original implementation just replaced the entire text of x.Pass() with std::move(x). Unfortunately, this doesn't work well with nested invocations of Pass(), since `x` will not include the nested rewrite to use std::move(). Instead, the tool is a bit more clever now: it inserts the text `std::move(` before the expression and deletes the now-unnecessary text `.Pass(`. This handles nested expressions well: it still fails for chained calls to Pass(), but meh. BUG=557422 Committed: https://crrev.com/47428586c0f9c9a1e1ec1aa8848ae3f35777ee41 Cr-Commit-Position: refs/heads/master@{#365913}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+64 lines, -20 lines) Patch
M tools/clang/pass_to_move/PassToMove.cpp View 1 chunk +22 lines, -18 lines 0 comments Download
M tools/clang/pass_to_move/tests/test-expected.cc View 1 chunk +21 lines, -1 line 0 comments Download
M tools/clang/pass_to_move/tests/test-original.cc View 1 chunk +21 lines, -1 line 0 comments Download

Messages

Total messages: 8 (3 generated)
dcheng
5 years ago (2015-12-17 21:27:56 UTC) #2
Nico
lgtm
5 years ago (2015-12-17 21:31:29 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1534793004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1534793004/1
5 years ago (2015-12-17 21:37:21 UTC) #5
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years ago (2015-12-17 22:19:57 UTC) #6
commit-bot: I haz the power
5 years ago (2015-12-17 22:20:54 UTC) #8
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/47428586c0f9c9a1e1ec1aa8848ae3f35777ee41
Cr-Commit-Position: refs/heads/master@{#365913}

Powered by Google App Engine
This is Rietveld 408576698