diff options
author | Jakub Kuderski <kubakuderski@gmail.com> | 2017-04-28 16:25:45 +0000 |
---|---|---|
committer | Jakub Kuderski <kubakuderski@gmail.com> | 2017-04-28 16:25:45 +0000 |
commit | 2a43d71765a124f25d832d780de04d5200faa1b3 (patch) | |
tree | c907ce8e25615b88dbc3743065ba28c7a6edbc94 /llvm/lib/IR/ModuleSummaryIndex.cpp | |
parent | 65e448422cd62c7ab4584291e141533ade73c799 (diff) | |
download | llvm-2a43d71765a124f25d832d780de04d5200faa1b3.zip llvm-2a43d71765a124f25d832d780de04d5200faa1b3.tar.gz llvm-2a43d71765a124f25d832d780de04d5200faa1b3.tar.bz2 |
[clang-tidy] modernize-use-emplace: remove unnecessary make_pair calls
Summary:
When there is a push_back with a call to make_pair, turn it into emplace_back and remove the unnecessary make_pair call.
Eg.
```
std::vector<std::pair<int, int>> v;
v.push_back(std::make_pair(1, 2)); // --> v.emplace_back(1, 2);
```
make_pair doesn't get removed when explicit template parameters are provided, because of potential problems with type conversions.
Reviewers: Prazek, aaron.ballman, hokein, alexfh
Reviewed By: Prazek, alexfh
Subscribers: JDevlieghere, JonasToth, cfe-commits
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D32395
llvm-svn: 301651
Diffstat (limited to 'llvm/lib/IR/ModuleSummaryIndex.cpp')
0 files changed, 0 insertions, 0 deletions