[PATCH] D116518: [ast-matchers] Add hasSubstatementSequence matcher

Richard via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 12 12:45:43 PST 2022


LegalizeAdulthood added a comment.

In D116518#3237927 <https://reviews.llvm.org/D116518#3237927>, @ymandel wrote:

> [...] In the meantime, I'll note that we have something similar internally
> which I never got around to upstreaming.

That's very interesting and is certainly more general than what I have
which is just scratching my own immediate itch.  I got lost in the variadic
functor/matcher infrastructure last night when I tried to reverse engineer
it to try and generalize what I had.

> That said, my experience indicates that once you're thinking in terms
> of sequences, you're probably going to find that you want to match
> over the CFG, rather than the AST directly.

Is there any tooling for matching the CFG currently?  I haven't come across
it but the code base is large and there's lots of stuff I haven't personally
browsed.


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

https://reviews.llvm.org/D116518



More information about the cfe-commits mailing list