[cfe-dev] Match Non-Type Template Parameter Using AST Matchers

Aaron Ballman via cfe-dev cfe-dev at lists.llvm.org
Mon Oct 5 13:04:12 PDT 2015


On Mon, Oct 5, 2015 at 4:01 PM, Daniel Dilts <diltsman at gmail.com> wrote:
> Two remaining questions:
> 1. What does ToT mean?

Tip of Tree -- aka, the latest version of the code from svn.

> 2. What is the name of the function?  I am not seeing anything that catches
> my eye on the reference page.

When we name AST matchers, we pull the name from the AST nodes
themselves, so in this case: nonTypeTemplateParmDecl()

~Aaron

>
> On Mon, Oct 5, 2015 at 12:54 PM, Aaron Ballman <aaron at aaronballman.com>
> wrote:
>>
>> On Mon, Oct 5, 2015 at 3:53 PM, Daniel Dilts <diltsman at gmail.com> wrote:
>> > Wow!  That was fast.  Has it been added to
>> >
>> > http://clang.llvm.org/docs/LibASTMatchersReference.html
>> >
>> > ?
>>
>> Relatively straight-forward, indeed. ;-)
>>
>> Yes, the documentation was also updated. However, this will only be
>> available if you pull the ToT from SVN and build from there (at least,
>> until 3.8 gets released sometime in the future).
>>
>> ~Aaron
>>
>> >
>> >
>> > On Mon, Oct 5, 2015 at 12:47 PM, Aaron Ballman <aaron at aaronballman.com>
>> > wrote:
>> >>
>> >> On Mon, Oct 5, 2015 at 3:38 PM, Daniel Dilts <diltsman at gmail.com>
>> >> wrote:
>> >> >> > Does anyone have any ideas on how to do this?
>> >> >>
>> >> >> That functionality doesn't currently exist. However, it should be
>> >> >> relatively straight-forward to add. I'm happy to do so if you would
>> >> >> find it useful.
>> >> >>
>> >> > Yes, it is something that I would find useful.  Also, it seems like
>> >> > something that should be there anyway, since it exists for type
>> >> > template
>> >> > parameters.
>> >>
>> >> Agreed, I think it was an oversight that it had not been included.
>> >> I've added it in r249341.
>> >>
>> >> ~Aaron
>> >
>> >
>
>



More information about the cfe-dev mailing list