#
f8d872c6 |
| 05-May-2017 |
Jakub Kuderski <kubakuderski@gmail.com> |
[clang-tidy] Fix PR32896: detect initializer lists in modernize-use-empalce
Summary: This patch fixes [[ https://bugs.llvm.org/show_bug.cgi?id=32896 | PR32896 ]].
The problem was that modernize-use
[clang-tidy] Fix PR32896: detect initializer lists in modernize-use-empalce
Summary: This patch fixes [[ https://bugs.llvm.org/show_bug.cgi?id=32896 | PR32896 ]].
The problem was that modernize-use-emplace incorrectly removed changed push_back into emplace_back, removing explicit constructor call with initializer list parameter, resulting in compiler error after applying fixits. modernize-use-emplace used to check if matched constructor had InitListExpr, but didn't check against CXXStdInitializerListExpr.
Eg.
``` std::vector<std::vector<int>> v; v.push_back(std::vector<int>({1})); // --> v.emplace_back({1}); ```
Reviewers: Prazek, alexfh, aaron.ballman
Reviewed By: Prazek, alexfh, aaron.ballman
Subscribers: xazax.hun, cfe-commits
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D32767
llvm-svn: 302281
show more ...
|
#
57fa1de5 |
| 30-Apr-2017 |
Jakub Kuderski <kubakuderski@gmail.com> |
[clang-tidy] Fix naming convention in modernize-use-emplace
Summary: Conform to the llvm naming convention for local variables in modernize-use-emplace check.
Reviewers: Prazek, JonasToth, alexfh
[clang-tidy] Fix naming convention in modernize-use-emplace
Summary: Conform to the llvm naming convention for local variables in modernize-use-emplace check.
Reviewers: Prazek, JonasToth, alexfh
Reviewed By: Prazek, JonasToth, alexfh
Subscribers: cfe-commits
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D32678
llvm-svn: 301780
show more ...
|
#
2a43d717 |
| 28-Apr-2017 |
Jakub Kuderski <kubakuderski@gmail.com> |
[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 cal
[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
show more ...
|
Revision tags: llvmorg-4.0.1-rc1, llvmorg-4.0.0, llvmorg-4.0.0-rc4, llvmorg-4.0.0-rc3, llvmorg-4.0.0-rc2, llvmorg-4.0.0-rc1, llvmorg-3.9.1, llvmorg-3.9.1-rc3, llvmorg-3.9.1-rc2, llvmorg-3.9.1-rc1, llvmorg-3.9.0, llvmorg-3.9.0-rc3, llvmorg-3.9.0-rc2, llvmorg-3.9.0-rc1 |
|
#
8f802291 |
| 29-Jul-2016 |
Piotr Padlewski <piotr.padlewski@gmail.com> |
[clang-tidy] Fixes to modernize-use-emplace
Not everything is valid, but it should works for 99.8% cases
https://reviews.llvm.org/D22208
llvm-svn: 277097
|
#
552d4494 |
| 21-Jun-2016 |
Piotr Padlewski <piotr.padlewski@gmail.com> |
[clang-tidy] Add modernize-use-emplace
Summary: Add check that replaces call of push_back to emplace_back
Reviewers: hokein
Differential Revision: http://reviews.llvm.org/D20964
llvm-svn: 273275
|