summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/modernize/UseAutoCheck.h
Commit message (Collapse)AuthorAgeFilesLines
* [clang-tidy] Switch checks to #include "ClangTidyCheck.h"Alexander Kornienko2019-03-251-1/+1
| | | | llvm-svn: 356892
* 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-use-auto] Add a threshold for minimal type name ↵Zinovy Nis2018-04-101-0/+1
| | | | | | | | | | | | length to be replaced with 'auto' The threshold option is 'MinTypeNameLength' with default value '5'. With MinTypeNameLength == 5 'int'/'bool' and 'const int'/'const bool' will not be converted to 'auto', while 'unsigned' will be. Differential Revision: https://reviews.llvm.org/D45405 llvm-svn: 329730
* Apply clang-tidy's performance-unnecessary-value-param to clang-tidy.Benjamin Kramer2017-03-211-1/+1
| | | | | | No functionality change intended. llvm-svn: 298442
* [clang-tidy] Enhance modernize-use-auto to castsMalcolm Parsons2016-10-311-1/+3
| | | | | | | | | | | | | | | | | | | | Summary: Extend modernize-use-auto to cases when a variable is assigned with a cast. e.g. Type *Ptr1 = dynamic_cast<Type*>(Ptr2); http://llvm.org/PR25499 Reviewers: angelgarcia, aaron.ballman, klimek, Prazek, alexfh Subscribers: Prazek, Eugene.Zelenko, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D25316 llvm-svn: 285579
* [clang-tidy] modernize-use-auto: don't remove stars by defaultAlexander Kornienko2016-06-031-3/+4
| | | | | | | | | | | | | | | Summary: By default, modernize-use-auto check will retain stars when replacing an explicit type with `auto`: `MyType *t = new MyType;` will be changed to `auto *t = new MyType;`, thus resulting in more consistency with the recommendations to use `auto *` for iterating over pointers in range-based for loops: http://llvm.org/docs/CodingStandards.html#beware-unnecessary-copies-with-auto The new `RemoveStars` option allows to revert to the old behavior: with the new option turned on the check will change `MyType *t = new MyType;` to `auto t = new MyType;`. Reviewers: aaron.ballman, sbenza Subscribers: Eugene.Zelenko, cfe-commits Differential Revision: http://reviews.llvm.org/D20917 llvm-svn: 271739
* [clang-tidy] Migrate UseAuto from clang-modernize to clang-tidy.Angel Garcia Gomez2015-08-211-0/+36
http://reviews.llvm.org/D12231 llvm-svn: 245703
OpenPOWER on IntegriCloud