[cfe-dev] Using AST nodes with clang dynamic matchers

Manuel Klimek via cfe-dev cfe-dev at lists.llvm.org
Thu Mar 9 01:20:08 PST 2017


+Sam for ideas

On Wed, Mar 8, 2017 at 6:23 PM David Come via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> Hello,
>
> I'm building a tool to find AST nodes according to an user provided file
> using a custom language. I'm also using clang dynamic matchers to find
> interesting nodes within functions CFG and do a bunch of thing. I would
> like to re-use one of the node I found previously in one of the clang
> matchers.
>
>
> There is equalsNode for static matchers but it obviously does not work
> with clang dynamic matchers.
>
>
> My idea would be to circumvent the problem by introducing into the
> matcher (once created from the string) already bounded nodes and use
> equalsBoundNode. But I can't find a way to do it.
>
>
> This could be handy to re-use in clang-query one match result into
> another one (some kind of persistent matching)
>
>
> Do you see another way to achieve what I wish to ?
>
>
> My last resort will be to change clang source code (assuming I'm
> successful) and let my tool rely on it but I would really like to stick
> to vanilla clang.
>
>
> Thanks,
>
> David.
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170309/5909c764/attachment.html>


More information about the cfe-dev mailing list