[PATCH] D32690: [clang-tidy] modernize-use-emplace: Remove unnecessary make_tuple calls
Jakub Kuderski via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Apr 30 15:43:56 PDT 2017
kuhar created this revision.
kuhar added a project: clang-tools-extra.
This patch makes modernize-use-emplace remove unnecessary make_tuple calls from push_back calls and turn them into emplace_back -- the same way make_pair calls are handled.
Eq.
std::vector<std::tuple<int, char, bool>> v;
v.push_back(std::make_tuple(1, 'A', true)); // --> v.emplace_back(1, 'A', true);
https://reviews.llvm.org/D32690
Files:
clang-tidy/modernize/UseEmplaceCheck.cpp
docs/ReleaseNotes.rst
test/clang-tidy/modernize-use-emplace.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32690.97247.patch
Type: text/x-patch
Size: 8664 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170430/e88041c3/attachment-0001.bin>
More information about the cfe-commits
mailing list