summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/modernize/MakeUniqueCheck.cpp
Commit message (Collapse)AuthorAgeFilesLines
* MakeUniqueCheck.cpp: explicit the fact that there is an autofix for this checkerSylvestre Ledru2020-01-101-0/+2
|
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [clang-tidy][modernize-make-unique] Checks c++14 flag before using ↵Alexander Kornienko2018-03-211-1/+7
| | | | | | | | | | | | | | | | | | | | std::make_unique Summary: For a c++11 code, the clang-tidy rule "modernize-make-unique" should return immediately, as std::make_unique is not supported. Reviewers: hokein, aaron.ballman, ilya-biryukov, alexfh Reviewed By: hokein, aaron.ballman, alexfh Subscribers: Quuxplusone, xazax.hun, cfe-commits Tags: #clang-tools-extra Patch by Frederic Tingaud! Differential Revision: https://reviews.llvm.org/D43766 llvm-svn: 328101
* Adapt clang-tidy checks to changing semantics of hasDeclaration.Manuel Klimek2017-08-021-12/+13
| | | | | | Differential Revision: https://reviews.llvm.org/D36154 llvm-svn: 309810
* [clang-tidy] Replace matchesName with hasName where no regex is neededAlexander Kornienko2017-05-171-8/+8
| | | | llvm-svn: 303263
* [clang-tidy] Add modernize-make-shared checkPiotr Padlewski2016-05-021-133/+18
| | | | | | | | | Because modernize-make-shared do almost the same job as modernize-make-unique, I refactored common code to MakeSmartPtrCheck. http://reviews.llvm.org/D19183 llvm-svn: 268253
* Improve modernize-make-unique matcher.Angel Garcia Gomez2015-11-041-3/+4
| | | | | | | | | | | | Summary: "std::unique_ptr<int>" is not the same type as "std::unique_ptr<int, std::default_delete<int>>", unless we insert a "hasCanonicalType" in the middle. Probably it also happens in other cases related to default template argument. Reviewers: klimek Subscribers: alexfh, cfe-commits Differential Revision: http://reviews.llvm.org/D14291 llvm-svn: 252041
* Correctly print the type in modernize-make-unique.Angel Garcia Gomez2015-10-221-2/+2
| | | | | | | | | | | | Summary: Take into account the current LangOptions the check has to add back the template argument. Reviewers: klimek Subscribers: alexfh, cfe-commits Differential Revision: http://reviews.llvm.org/D13983 llvm-svn: 251013
* Make string constants in the modernize module static.Angel Garcia Gomez2015-10-221-3/+3
| | | | | | | | | | | | Summary: Add static to global variables, if they are not in an anonymous namespace. Reviewers: klimek Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D13975 llvm-svn: 251005
* Support every kind of initialization.Angel Garcia Gomez2015-10-141-3/+41
| | | | | | | | | | | | Summary: modernize-make-unique now correctly supports the different kinds of list initialization. Reviewers: klimek Subscribers: cfe-commits, alexfh Differential Revision: http://reviews.llvm.org/D13590 llvm-svn: 250283
* Use better mocks in modernize-make-unique, and fix matcher.Angel Garcia Gomez2015-10-051-3/+11
| | | | | | | | | | | | Summary: Add the second template argument to the unique_ptr mock, and update the matcher so that it only matches against cases where the second argument is the default. Reviewers: klimek Subscribers: alexfh, cfe-commits Differential Revision: http://reviews.llvm.org/D13433 llvm-svn: 249305
* Create modernize-make-unique check.Angel Garcia Gomez2015-09-291-0/+108
Summary: create a check that replaces 'std::unique_ptr<type>(new type(args...))' with 'std::make_unique<type>(args...)'. It was on the list of "Ideas for new Tools". It needs to be tested more carefully, but first I wanted to know if you think it is worth the effort. Reviewers: klimek Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D13166 llvm-svn: 248785
OpenPOWER on IntegriCloud