llvm-project/clang-tools-extra/docs/clang-tidy
Mitchell Balan 73d93617d3 [clang-tidy] modernize-use-using uses AST and now supports struct defintions 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
2020-01-07 16:36:11 -05:00
..
checks [clang-tidy] modernize-use-using uses AST and now supports struct defintions and multiple types in a typedef 2020-01-07 16:36:11 -05:00
Contributing.rst [docs] Update path to clang-tools-extra 2020-01-02 19:30:29 +08:00
Integrations.rst [clang-tidy] Update documentation for Qt Creator integration. 2019-06-25 13:50:09 +00:00
index.rst doc: Document that extra-arg/extra-arg-before can be used several times 2019-12-24 13:07:08 +01:00