[PATCH] D21185: [clang-tidy] Add performance-emplace-into-containers
Vedant Kumar via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 9 09:07:44 PDT 2016
vsk created this revision.
vsk added reviewers: aaron.ballman, alexfh.
vsk added a subscriber: cfe-commits.
Introduce a check which suggests when it might be helpful to use "emplace" methods. The initial version only works with std::vector and push_back (e.g `V.push_back(T(1, 2))` -> `V.emplace_back(1, 2)`). It could be extended to work with other containers and methods.
http://reviews.llvm.org/D21185
Files:
clang-tidy/performance/CMakeLists.txt
clang-tidy/performance/EmplaceCheck.cpp
clang-tidy/performance/EmplaceCheck.h
clang-tidy/performance/PerformanceTidyModule.cpp
test/clang-tidy/performance-emplace-into-containers.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21185.60183.patch
Type: text/x-patch
Size: 7411 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160609/9013e2ec/attachment-0001.bin>
More information about the cfe-commits
mailing list