<div dir="ltr">+cfe-dev<div><br><div class="gmail_extra"><div class="gmail_quote">On Mon, Mar 4, 2013 at 6:09 PM, Vane, Edwin <span dir="ltr"><<a href="mailto:edwin.vane@intel.com" target="_blank">edwin.vane@intel.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Manuel,<br>
<br>
I've seen a need for subexpression matching arise several times in working with matchers. Often it comes in the form of: match this expression of this "thing over here" is the same as "that thing over there". In the use-auto transform for example, the only thing that's not in a matcher is the test that the vardecl type is the same as the initializer. Have you had any thoughts about this feature before?<br>
</blockquote><div><br></div><div style>There are two ways to do this:</div><div style>1. be able to express references in the matcher language; this is hard, but if somebody wanted to give it a go, I'd be excited ;)</div>
<div style>2. just do a submatch in the callback - that's what match() on the ASTMatchFinder and the freestanding match() functions around the ASTMatchFinder are for; this is what we're currently using - thanks to the caching of the parent map in the ASTContext this is now also computationally acceptable :)</div>
<div style><br></div><div style>Cheers,</div><div style>/Manuel</div></div></div></div></div>