[PATCH] D19871: Add an AST matcher for CastExpr kind
Samuel Benzaquen via cfe-commits
cfe-commits at lists.llvm.org
Tue May 3 08:42:20 PDT 2016
sbenza added a comment.
In http://reviews.llvm.org/D19871#419985, @aaron.ballman wrote:
> In http://reviews.llvm.org/D19871#419954, @etienneb wrote:
>
> > In http://reviews.llvm.org/D19871#419947, @aaron.ballman wrote:
> >
> > > Is this required for some purpose?
> >
> >
> > It's used in clang-tidy checkers.
> >
> > see http://reviews.llvm.org/D19841
>
>
> It's good to have that context in a review for functionality that isn't part of the proposed patch. :-) Looking at the other patch, I would prefer to keep this matcher narrowed to just clang-tidy unless you can also solve how to expose it via the dynamic registry so that it can be used by tools like clang-query.
What we have done in the past with enum-arg matchers is to use string->enum conversion in the dynamic bindings.
See the specialization `ArgTypeTraits<attr::Kind>` in `Marshallers.h`.
We could add one for `CastKind` too.
http://reviews.llvm.org/D19871
More information about the cfe-commits
mailing list