summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.h
Commit message (Collapse)AuthorAgeFilesLines
* [clang-tidy] Switch checks to #include "ClangTidyCheck.h"Alexander Kornienko2019-03-251-1/+1
| | | | llvm-svn: 356892
* [clang-tidy] Move all checks to the new registerPPCallbacks APIAlexander Kornienko2019-03-221-1/+2
| | | | llvm-svn: 356796
* 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] Fix handling of parens around new expressions in ↵Alexander Kornienko2018-10-091-8/+6
| | | | | | | | | | | | | | | | | | make_<smartptr> checks. Summary: Extra parentheses around a new expression result in incorrect code after applying fixes. Reviewers: hokein Reviewed By: hokein Subscribers: xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D52989 llvm-svn: 344058
* [clang-tidy][modernize-make-unique] Checks c++14 flag before using ↵Alexander Kornienko2018-03-211-0/+3
| | | | | | | | | | | | | | | | | | | | 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
* [clang-tidy] Don't generate fixes for initializer_list constructor in ↵Haojian Wu2017-08-171-1/+2
| | | | | | | | | | | | | | | | | | | | | make_unique check. Summary: The current fix will break the compilation -- because braced list is not deducible in std::make_unique (with the use of forwarding) without specifying the type explicitly. We could support it in the future. Reviewers: alexfh Reviewed By: alexfh Subscribers: JDevlieghere, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D36786 llvm-svn: 311078
* [clang-tidy] Ignore macros in make-unique check.Haojian Wu2017-08-041-0/+1
| | | | | | | | | | | | | | | | Summary: The check doesn't fully support smart-ptr usages inside macros, which may cause incorrect fixes, or even crashes, ignore them for now. Reviewers: alexfh Reviewed By: alexfh Subscribers: JDevlieghere, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D36264 llvm-svn: 310050
* [clang-tidy] Add "MakeSmartPtrFunction" option to ↵Haojian Wu2017-07-051-2/+10
| | | | | | | | | | | | | | modernize-make-shared/unique checks. Reviewers: alexfh, aaron.ballman Reviewed By: alexfh Subscribers: JDevlieghere, Eugene.Zelenko, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D34206 llvm-svn: 307130
* [clang-tidy] Handle new array expressions in modernize-make-unique check.Haojian Wu2017-06-271-1/+2
| | | | | | | | | | | | Reviewers: alexfh Reviewed By: alexfh Subscribers: JDevlieghere, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D34674 llvm-svn: 306421
* [clang-tidy] Enhance modernize-make-unique to handle unique_ptr.reset()Malcolm Parsons2016-10-311-0/+7
| | | | | | | | | | | | | | | Summary: Avoid naked new in unique_ptr.reset() by using make_unique Fixes http://llvm.org/PR27383 Reviewers: alexfh, aaron.ballman Subscribers: Prazek, cfe-commits Differential Revision: https://reviews.llvm.org/D25898 llvm-svn: 285589
* [Clang-tidy] Fix Clang-tidy modernize-use-override and some Include What You ↵Eugene Zelenko2016-05-031-3/+5
| | | | | | Use warnings in modernize/MakeSmartPtrCheck.h. llvm-svn: 268349
* [clang-tidy] Add modernize-make-shared checkPiotr Padlewski2016-05-021-0/+50
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
OpenPOWER on IntegriCloud