summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/modernize/ModernizeTidyModule.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [clang-tidy] Add modernize-make-shared checkPiotr Padlewski2016-05-021-0/+2
| | | | | | | | | 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
* clang-tidy: Add check modernize-raw-string-literalRichard Thomson2016-03-271-0/+3
| | | | llvm-svn: 264539
* [clang-tidy] introduce modernize-deprecated-headers checkAlexander Kornienko2016-02-241-0/+3
| | | | | | | | | | | | | | | | | Summary: This patch introduces the modernize-deprecated-headers check, which is supposed to replace deprecated C library headers with the C++ STL-ones. For information see documentation; for exmaples see the test cases. Reviewers: Eugene.Zelenko, LegalizeAdulthood, alexfh Subscribers: cfe-commits Patch by Kirill Bobyrev! Differential Revision: http://reviews.llvm.org/D17484 llvm-svn: 261738
* Only copy small types in modernize-loop-convert.Angel Garcia Gomez2015-10-301-0/+4
| | | | | | | | | | | | Summary: If the size of the type is above a certain bound, we'll take a const reference. This bound can be set as an option. For now, the default value is 16 bytes. Reviewers: klimek Subscribers: alexfh, cfe-commits Differential Revision: http://reviews.llvm.org/D14176 llvm-svn: 251694
* Add modernize-redundant-void-arg check to clang-tidyAlexander Kornienko2015-10-281-0/+3
| | | | | | | | | | | | | | | | | | | | | This check for clang-tidy looks for function with zero arguments declared as (void) and removes the unnecessary void token. int foo(void); becomes int foo(); The check performs no formatting of the surrounding context but uses the lexer to look for the token sequence "(", "void", ")" in the prototype text. If this sequence of tokens is found, a removal is issued for the void token only. Patch by Richard Thomson! (+fixed tests, moved the check to the modernize module) Differential revision: http://reviews.llvm.org/D7639 llvm-svn: 251475
* Add modernize-use-default check to clang-tidy.Angel Garcia Gomez2015-10-211-3/+4
| | | | | | | | | | | | | | | | | | | Summary: Add a check that replaces empty bodies of special member functions with '= default;'. For now, it is only implemented for the default constructor and the destructor, which are the easier cases. The copy-constructor and the copy-assignment operator cases will be implemented later. I applied this check to the llvm code base and found 627 warnings (385 in llvm, 9 in compiler-rt, 220 in clang and 13 in clang-tools-extra). Applying the fixes didn't break any build or test, it only caused a -Wpedantic warning in lib/Target/Mips/MipsOptionRecord.h:33 becaused it replaced virtual ~MipsOptionRecord(){}; to virtual ~MipsOptionRecord()= default;; Reviewers: klimek Subscribers: george.burgess.iv, Eugene.Zelenko, alexfh, cfe-commits Differential Revision: http://reviews.llvm.org/D13871 llvm-svn: 250897
* Create modernize-make-unique check.Angel Garcia Gomez2015-09-291-0/+3
| | | | | | | | | | | | 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
* Add NamingStyle option to modernize-loop-convert.Angel Garcia Gomez2015-09-241-0/+1
| | | | | | | | | | | | Summary: Add an option to specify wich style must be followed when choosing the new index name. Reviewers: alexfh Subscribers: cfe-commits, klimek Differential Revision: http://reviews.llvm.org/D13052 llvm-svn: 248517
* [clang-tidy] Move misc-use-override and readability-shrink-to-fit to ↵Alexander Kornienko2015-08-311-0/+4
| | | | | | | | | "modernize/" These checks are focusing on migrating the code from C++98/03 to C++11, so they belong to the modernize module. llvm-svn: 246437
* Add replace-auto_ptr check.Angel Garcia Gomez2015-08-251-0/+4
| | | | | | | | | | | | Summary: Migrate replace-auto_ptr check from clang-modernize to modernize module in clang-tidy. Reviewers: alexfh Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D12287 llvm-svn: 245933
* [clang-tidy] Migrate UseAuto from clang-modernize to clang-tidy.Angel Garcia Gomez2015-08-211-0/+2
| | | | | | http://reviews.llvm.org/D12231 llvm-svn: 245703
* [clang-tidy] Add modernize-use-nullptr check, attempt 2.Alexander Kornienko2015-08-191-0/+5
| | | | | | | | | | | This patch re-applies r245434 and r245471 reverted in r245493, and changes the way custom null macros are configured. The test for custom null macros is temporarily excluded and will be committed separately to reduce chances of breakages. Initial patches by Angel Garcia. llvm-svn: 245511
* Revert "[clang-tidy] Add use-nullptr check to clang-tidy."Justin Bogner2015-08-191-5/+0
| | | | | | | | | | The new test is failing on darwin: http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_check/10339/ This reverts r245434 and its follow up r245471. llvm-svn: 245493
* [clang-tidy] Add use-nullptr check to clang-tidy.Alexander Kornienko2015-08-191-0/+5
| | | | | | | | | | Move UseNullptr from clang-modernize to modernize module in clang-tidy. http://reviews.llvm.org/D12081 Patch by Angel Garcia! llvm-svn: 245434
* [clang-tidy] Add loop-convert check to clang-tidy.Alexander Kornienko2015-08-191-0/+3
| | | | | | | | | | Move LoopConvert from clang-modernize to modernize module in clang-tidy. http://reviews.llvm.org/D12076 Patch by Angel Garcia! llvm-svn: 245427
* [clang-tidy] Create clang-tidy module modernize. Add pass-by-value check.Alexander Kornienko2015-08-141-0/+46
This is the first step for migrating cppmodernize to clang-tidy. http://reviews.llvm.org/D11946 Patch by Angel Garcia! llvm-svn: 245045
OpenPOWER on IntegriCloud