[PATCH] D12839: Extend MoveConstructorInitCheck to also flag constructor arguments passed by value and can be moved assigned to fields.

Felix Berger via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 14 08:03:30 PDT 2015


flx created this revision.
flx added reviewers: alexfh, sbenza, aaron.ballman.
flx added a subscriber: cfe-commits.

Add matcher that identifies arguments that are passed by value, are copy assigned to a class field and have a non-deleted move constructor. If the type is also expensive to copy issue diagnostic message that the field can be move constructed.

http://reviews.llvm.org/D12839

Files:
  clang-tidy/misc/MoveConstructorInitCheck.cpp
  clang-tidy/misc/MoveConstructorInitCheck.h
  test/clang-tidy/misc-move-constructor-init.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12839.34670.patch
Type: text/x-patch
Size: 7698 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150914/b6dc63d6/attachment-0001.bin>


More information about the cfe-commits mailing list