<div dir="ltr">Hi!<div><br></div><div>I like the idea of making writing tools/prototypes easier. But if the goal is to get rid of invisible nodes when matching I wonder if this would somewhat overlap with syntax trees [1]. Adding Dmitri and Ilya in case they have an opinion on that.</div><div><br></div><div>Cheers,</div><div>Gabor</div><div><br></div><div>[1]: <a href="https://docs.google.com/document/d/161XftOcF-ut1pGQr5ci9kXd_y0jRQl3y9sVyvuEkLDc/edit#heading=h.cwnlr9q7jmlp">https://docs.google.com/document/d/161XftOcF-ut1pGQr5ci9kXd_y0jRQl3y9sVyvuEkLDc/edit#heading=h.cwnlr9q7jmlp</a></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Dec 20, 2019 at 1:06 PM Aaron Ballman via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fri, Dec 20, 2019 at 4:01 PM Stephen Kelly via cfe-dev<br>
<<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:<br>
><br>
><br>
> Hi,<br>
><br>
> (Apologies if you receive this twice. GMail classified the first one as<br>
> spam)<br>
><br>
> Aaron Ballman and I met by chance in Belfast and we discussed a way<br>
> forward towards making AST Matchers easier to use, particularly for C++<br>
> developers who are not familiar with the details of the Clang AST.<br>
><br>
> For those unaware, I expanded on this in the EuroLLVM conference this<br>
> year, and then expanded on it at ACCU:<br>
><br>
>   <a href="https://steveire.wordpress.com/2019/04/30/the-future-of-ast-matching" rel="noreferrer" target="_blank">https://steveire.wordpress.com/2019/04/30/the-future-of-ast-matching</a><br>
><br>
> One step in the process of getting there is changing the default<br>
> behavior of AST Matchers to ignore invisible nodes while matching using<br>
> the C++ API, and while matching and dumping AST nodes in clang-query.<br>
><br>
> I think this is the most important change in the entire proposal as it<br>
> sets out the intention of making the AST Matchers easier to use for C++<br>
> developers who are not already familiar with Clang APIs.<br>
><br>
> To that end, I've written an AST to motivate the change:<br>
><br>
><br>
> <a href="https://docs.google.com/document/d/17Z6gAwwc3HoRXvsy0OdwU0X5MFQEuiGeSu3i6ICOB90" rel="noreferrer" target="_blank">https://docs.google.com/document/d/17Z6gAwwc3HoRXvsy0OdwU0X5MFQEuiGeSu3i6ICOB90</a><br>
><br>
> We're looking for feedback before pressing forward with the change. I<br>
> already have some patches written to port clang-tidy and unit tests to<br>
> account for the change of default.<br>
<br>
I'm generally in favor of this path forward. I think this is the<br>
correct default and allows a more gentle introduction to AST matchers<br>
for people new to the project (which helps with introducing new<br>
clang-tidy checks) while still allowing people who need to get into<br>
the nitty gritty details of the AST to do so as needed. Thank you for<br>
the efforts!<br>
<br>
CCing Manual, Alex, and Sam because they do a lot of work on the<br>
matcher interfaces as well.<br>
<br>
~Aaron<br>
<br>
><br>
> Thanks,<br>
><br>
> Stephen.<br>
> _______________________________________________<br>
> cfe-dev mailing list<br>
> <a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div>