[PATCH] D158872: [clang][ASTMatchers] Add a few type-related Matchers

Ding Fei via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 29 23:20:24 PDT 2023


danix800 added a comment.

In D158872#4627313 <https://reviews.llvm.org/D158872#4627313>, @PiotrZSL wrote:

> From a mine perspective when it comes to clang-tidy:
>
> - I personally do not care about Objective-C specific matchers - I do not plan to use them.
> - I personally avoid using "Type" based matchers if I can (due to mess with elaborated/wrapped types), it's easier to create custom local matcher for QualType and do there anything is needed. QualType/Type class got very helpful API.
> - There is nothing more annoying than not having a main matcher for specific Stmt, Decl, Expr, TypeLoc (places that actually got SourceLocation) and some basic matchers for traversal into parents/childs.
> - There are lot of local matchers defined in Clang-tidy, those would be a best candidates to push upwards.
> - I'm missing some matchers related to AST traversal: noneOf, equalOrDescendant, hasFirstAncestor(PositiveMatcher, NegativeMatcher), isBeforeInTransationUnit, isInSameScopeAsBoundNode, ...
>
> As for matchers in this change, except maybe hasTypeForDecl, I do not think that I will be using them.

All right, I'll abandon this revison. Thanks for reviewing.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D158872



More information about the cfe-commits mailing list