[PATCH] D70270: clang-tidy: modernize-use-using uses AST and now supports struct defintions and multiple types in a typedef

Conrad Poelman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 15 21:11:45 PST 2019


poelmanc added a comment.

> If there's a way to match only `CXXRecordDecl`s that are immediately followed by a `TypedefDecl`...

Alternatively, within `check()` when we get the `TypedefDecl`, is there any way to navigate up the AST to find its immediately preceding sibling node in the AST and check whether it's a `CXXRecordDecl`? If so we could eliminate `Finder->addMatcher(cxxRecordDecl(unless(isImplicit())).bind("struct"), this);` altogether. I didn't see a way to do that though.


Repository:
  rCTE Clang Tools Extra

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70270/new/

https://reviews.llvm.org/D70270





More information about the cfe-commits mailing list