[cfe-dev] RFC: Easier AST Matching by Default

Stephen Kelly via cfe-dev cfe-dev at lists.llvm.org
Wed May 27 12:29:32 PDT 2020


On 27/05/2020 16:33, Yitzhak Mandelbaum wrote:
> Stephen -- there are three upstream changes that we'll need to fix all 
> of our tests:
> 1. Transformers' `applyFirst`, as discussed in the thread on D80606.
> 2. Add an overload of the `traverse` matcher for `DynTypedMatcher`.
> 3. Support `traverse` in the matcher parser (the one used by clang-query).
>
> I'm working on the first one now. But, do you have any thoughts/plans 
> for the latter two?

Yes, I started a patch in January for (3), but didn't continue it as the 
RFC stalled from then. I've uploaded it as a WIP patch:

  https://reviews.llvm.org/D80654

I can look into (2) and see if I can finish the patch for (3) in the 
coming days.

Related to (3), note that you can use

  set traversal AsIs

and

  set traversal IgnoreUnlessSpelledInSource

in clang-query now too. It affects matchers and AST dumps.

Thanks,

Stephen.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20200527/eac58a6a/attachment.html>


More information about the cfe-dev mailing list