DescriptionUpdate 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 #
Messages
Total messages: 8 (3 generated)
|