[PATCH] D11615: Fix redundant move warning

Richard Trieu rtrieu at google.com
Wed Jul 29 16:41:38 PDT 2015


rtrieu created this revision.
rtrieu added a reviewer: rsmith.
rtrieu added subscribers: CornedBee, arthur.j.odwyer, cfe-commits.

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.

http://reviews.llvm.org/D11615

Files:
  lib/Sema/SemaInit.cpp
  test/SemaCXX/warn-pessmizing-move.cpp
  test/SemaCXX/warn-redundant-move.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11615.30967.patch
Type: text/x-patch
Size: 7706 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150729/b9fc5b4f/attachment.bin>


More information about the cfe-commits mailing list