This is an archive of the discontinued LLVM Phabricator instance.

Fix redundant move warning
ClosedPublic

Authored by rtrieu on Jul 29 2015, 4:41 PM.

Details

Reviewers
rsmith
Summary

Until DR1579 is implemented, redundant move should only be emitted when a parameter variable has the same type as the function return type and is returned. This removes the case where the returned type and the returned variable have different types. Also include a test to check for that the move constructor is used by checking the AST dump.

Diff Detail

Event Timeline

rtrieu updated this revision to Diff 30967.Jul 29 2015, 4:41 PM
rtrieu retitled this revision from to Fix redundant move warning.
rtrieu updated this object.
rtrieu added a reviewer: rsmith.
rsmith accepted this revision.Jul 29 2015, 4:43 PM
rsmith edited edge metadata.

LGTM

This revision is now accepted and ready to land.Jul 29 2015, 4:43 PM
rtrieu closed this revision.Jul 29 2015, 6:51 PM

Committed at r243594.