<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Jan 17, 2014 at 9:50 PM, Christian Schafmeister <span dir="ltr"><<a href="mailto:chris.schaf@verizon.net" target="_blank">chris.schaf@verizon.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Question 1:<br>
<br>
Would it be possible to have hasParameter(unsigned N,…), hasArgument(unsigned N,…), hasTemplateArgument(unsigned N,…) etc<br>
to take signed integer N as an argument and use negative values to address the parameters, arguments etc from the right hand side of the list?<br></blockquote><div><br></div><div>It most certainly would...</div><div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Or is there another way to explicitly match on the last or second last parameter, argument etc if I don’t know how many entries are available for a particular node?<br></blockquote><div><br></div><div>Nope. You can of course always match "any" (and bind it) and then use the callback to figure out which one it was.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Question 2:<br>
When reading the documentation at <a href="http://clang.llvm.org/docs/LibASTMatchersReference.html" target="_blank">http://clang.llvm.org/docs/LibASTMatchersReference.html</a><br>
<br>
What does it mean in the AST Traversal Matchers when the Parameters are "Matcher<Type>" vs "Matcher<Expr> InnerMatcher”?<br>
What does the “InnerMatcher” part refer to - if this is anything other than the matcher argument that you put inside the parentheses as an argument. If all it means is the argument then why does “hasElementType” have the parameter “Matcher<Type>”?<br>
</blockquote><div><br></div><div>Yes, I think it's pretty much what you're saying :)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Sorry if question 2 is not very clear, perhaps I’m reading too much into what is written in the parameter column of each matcher.<br>
<br>
Best,<br>
<br>
.Chris.<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
<br>
Christian Schafmeister<br>
<a href="mailto:chris.schaf@verizon.net">chris.schaf@verizon.net</a><br>
<br>
<br>
</font></span></blockquote></div><br></div></div>