summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/modernize/UseUsingCheck.h
Commit message (Collapse)AuthorAgeFilesLines
* [clang-tidy] modernize-use-using uses AST and now supports struct defintions ↵Mitchell Balan2020-01-071-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | and multiple types in a typedef Summary: It now handles `typedef`s that include comma-separated multiple types, and handles embedded struct definitions, which previously could not be automatically converted. For example, with this patch `modernize-use-using` now can convert: typedef struct { int a; } R_t, *R_p; to: using R_t = struct { int a; }; using R_p = R_t*; `-ast-dump` showed that the `CXXRecordDecl` definitions and multiple `TypedefDecl`s come consecutively in the tree, so `check()` stores information between calls to determine when it is receiving a second or additional `TypedefDecl` within a single `typedef`, or when the current `TypedefDecl` refers to an embedded `CXXRecordDecl` like a `struct`. Reviewers: alexfh, aaron.ballman Patch by: poelmanc Subscribers: riccibruno, sammccall, cfe-commits, aaron.ballman Tags: clang-tools-extra, clang Differential Revision: https://reviews.llvm.org/D70270
* [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
* Fixes for modernize-use-using check:Krystyna Gajczyk2017-04-021-2/+7
| | | | | | | | | | | - removed unnessacary namespaces - added option to print warning in macros - no fix for typedef with array - removed "void" word from functions with 0 parameters Differential Revision: https://reviews.llvm.org/D29262 llvm-svn: 299340
* [clang-tidy] Add modernize-use-usingKrystyna Gajczyk2016-06-251-0/+35
http://reviews.llvm.org/D18919 llvm-svn: 273786
OpenPOWER on IntegriCloud