[cfe-dev] RFC: Easier AST Matching by Default
David Rector via cfe-dev
cfe-dev at lists.llvm.org
Tue Jun 30 15:39:34 PDT 2020
Good idea — revert to default for now, spend some time reflecting on the ideas. Unless anyone objects, let’s do that.
I am knee deep in another project right now, but if by the time I finish it in a few months if nobody else has tried this out, I’ll have a look and implement it. (I don’t in fact actually use ASTMatchers, I only got into this thread to give you some support b/c I admired your dedication to helping beginners — and still do!)
If somebody else wants to try it in the meantime, go for it! It seems straightforward but there are definitely some details to consider — e.g. you’d definitely want to adjust TraverseStmt/TraverseType so that, after you delve into the children an implicit node via getAs, you would then skip any implicit nodes you’ve already covered — otherwise you’d get duplicates and/or be doing a lot of needless re-traversal. (And don’t forget, while you’re under the hood, to fix the DataRecursionQueue Stmt-traversal order problem in raised by Billy way back when...).
Good luck all,
Dave
> On Jun 30, 2020, at 6:18 PM, Stephen Kelly <steveire at gmail.com> wrote:
>
>
> On 30/06/2020 22:48, David Rector wrote:
>> Ultimately Stephen, you put in the work, and are entitled to an up or down vote — that’s fair. Thank you for that work, and good luck to you and others,
>
>
> Sorry, there may be misunderstanding here. Rather than bowing out, I think it would be good if you made a proof of concept.
>
> I think, but I'm not certain, that there is more mood to investigate in the direction you wish to proceed.
>
> My suggestion is to revert the default to give time for you to flesh out the design.
>
> Thanks,
>
> Stephen.
>
>
More information about the cfe-dev
mailing list