[PATCH] D17491: Add performance check to flag function parameters of expensive to copy types that can be safely converted to const references.

Felix Berger via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 22 21:01:01 PDT 2016


flx updated the summary for this revision.
flx updated this revision to Diff 51385.
flx marked 5 inline comments as done.
flx added a comment.

After testing the check against a large corpus  I was able to remove the unnecessary param index check. But I discovered that the check crashed on value arguments of deleted assignment operators due to the lack of a function body. I added a test case and added a guard to address this.


http://reviews.llvm.org/D17491

Files:
  clang-tidy/performance/CMakeLists.txt
  clang-tidy/performance/PerformanceTidyModule.cpp
  clang-tidy/performance/UnnecessaryValueParamCheck.cpp
  clang-tidy/performance/UnnecessaryValueParamCheck.h
  docs/clang-tidy/checks/list.rst
  docs/clang-tidy/checks/performance-unnecessary-value-param.rst
  test/clang-tidy/performance-unnecessary-value-param.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17491.51385.patch
Type: text/x-patch
Size: 15148 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160323/7f2c4ac8/attachment-0001.bin>


More information about the cfe-commits mailing list