[PATCH] D21303: [clang-tidy] Adds performance-returning-type check.
Jakub StaroĊ via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 13 12:46:44 PDT 2016
staronj created this revision.
staronj added reviewers: Prazek, alex.
staronj added a subscriber: cfe-commits.
Adds performance-returning-type check.
This check is trying to find places, where one is returning different type than function returning type and when returned object is being copied instead of moved. Check wraps it with std::move when it could make it being moved.
I ran this check on LLVM codebase and it produced following changes: http://reviews.llvm.org/D21302
http://reviews.llvm.org/D21303
Files:
clang-tidy/performance/CMakeLists.txt
clang-tidy/performance/PerformanceTidyModule.cpp
clang-tidy/performance/ReturningTypeCheck.cpp
clang-tidy/performance/ReturningTypeCheck.h
docs/ReleaseNotes.rst
docs/clang-tidy/checks/list.rst
docs/clang-tidy/checks/performance-returning-type.rst
test/clang-tidy/performance-returning-type.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21303.60587.patch
Type: text/x-patch
Size: 23247 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160613/cc5b5e70/attachment-0001.bin>
More information about the cfe-commits
mailing list