llvm-project/clang-tools-extra/clang-tidy
Jakub Kuderski 4cdeb41072 [clang-tidy] modernize-use-emplace: Remove unnecessary make_tuple calls
Summary:
This patch makes modernize-use-emplace remove unnecessary make_ calls from push_back calls and turn them into emplace_back -- the same way make_pair calls are handled.
Custom make_ calls can be removed for custom tuple-like types -- two new options that control that are `TupleTypes` and `TupleMakeFunctions`. By default, the check removes calls to `std::make_pair` and `std::make_tuple`.

Eq.

```
std::vector<std::tuple<int, char, bool>> v;
v.push_back(std::make_tuple(1, 'A', true)); // --> v.emplace_back(1, 'A', true);
```

Reviewers: alexfh, aaron.ballman, Prazek, hokein

Reviewed By: Prazek

Subscribers: JDevlieghere, xazax.hun, JonasToth, cfe-commits

Tags: #clang-tools-extra

Differential Revision: https://reviews.llvm.org/D32690

llvm-svn: 303145
2017-05-16 06:32:38 +00:00
..
boost [clang-tidy] boost-use-to-string arg expr location bugfix 2016-06-28 08:16:20 +00:00
cert [clang-tidy] Add new cert-dcl21-cpp check 2017-05-10 11:16:55 +00:00
cppcoreguidelines Spelling mistakes in comments. NFCI. 2017-03-30 13:10:33 +00:00
google Make google-build-using-namespace skip std::.*literals 2017-05-15 17:37:48 +00:00
hicpp [clang-tidy] fix for linker errors in hicpp checks 2017-03-30 12:31:02 +00:00
llvm [clang-tidy] TwineLocalCheck: add param # checking 2017-05-14 04:14:59 +00:00
misc Change EOL style to LF. NFC 2017-05-09 14:56:28 +00:00
modernize [clang-tidy] modernize-use-emplace: Remove unnecessary make_tuple calls 2017-05-16 06:32:38 +00:00
mpi modernize-use-auto NFC fixes 2016-12-14 15:29:23 +00:00
performance [clang-tidy] Fix a typo: dequeue => deque 2017-05-15 18:18:28 +00:00
plugin [clang-tidy] fix missing anchor for MPI Module 2016-12-16 09:14:47 +00:00
readability [clang-tidy] Partly rewrite readability-simplify-boolean-expr using RAV 2017-05-15 17:06:51 +00:00
tool [clang-tidy][CMake] Make clang-tidy usable as distribution component 2017-05-10 16:20:54 +00:00
utils Extend readability-container-size-empty to add comparisons to empty-state objects. 2017-04-24 14:57:09 +00:00
CMakeLists.txt Rename the clang-tidy safety module to be hicpp, for the High-Integrity C++ coding standard from PRQA. 2017-03-19 17:23:23 +00:00
ClangTidy.cpp [clang-tidy] Reuse FileID in getLocation 2017-04-06 20:19:26 +00:00
ClangTidy.h [clang-tidy] Add FormatStyle configuration option. 2017-04-06 13:41:29 +00:00
ClangTidyDiagnosticConsumer.cpp [clang-tidy] Allow disabling compatibility check for generated fixes. 2017-05-09 15:10:26 +00:00
ClangTidyDiagnosticConsumer.h [clang-tidy] Allow disabling compatibility check for generated fixes. 2017-05-09 15:10:26 +00:00
ClangTidyModule.cpp Apply performance-unnecessary-value-param to clang-tidy. 2016-06-15 15:46:10 +00:00
ClangTidyModule.h [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
ClangTidyModuleRegistry.h Reapply r276973 "Adjust Registry interface to not require plugins to export a registry" 2016-08-05 11:01:08 +00:00
ClangTidyOptions.cpp [clang-tidy] Add FormatStyle configuration option. 2017-04-06 13:41:29 +00:00
ClangTidyOptions.h [clang-tidy] Add FormatStyle configuration option. 2017-04-06 13:41:29 +00:00
add_new_check.py [clang-tidy] Rename modernize-use-default to modernize-use-equals-default 2016-12-01 17:24:42 +00:00
rename_check.py [clang-tidy] Improve rename_check.py. 2016-11-08 11:43:50 +00:00