<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">On Wed, May 8, 2013 at 11:53 AM, Manuel Klimek <span dir="ltr"><<a href="mailto:klimek@google.com" target="_blank" class="cremed">klimek@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
  My first gut feeling reaction is that we'll want a different solution than to make DynTypedNode more complex, and thus less predictable.<br></blockquote><div><br></div><div style>Do you want me to take this piece into a different CL?</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">  We had a reason for have the explicit overloads in the ASTMatchFinder instead of just working on the interface - the problem is that you can otherwise hand in lots of matchers that are impossible to get a match with...<br>
</blockquote><div><br></div><div style>Can you give an example?</div><div style>Not matching a Matcher<Type> without the conversion to Matcher<QualType> seems like a bug to me. The visitor should visit the Type node.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
  Things we could consider:<br>
  1. take a DynTypedMatcher* and take ownership - together with clone(), this allows users to do everything they need, and doesn't lead to overload confusion.<br></blockquote><div style>If there is going to be a const DynTypedMatcher& overload, I think we should remove the other ones. Otherwise you could have potentially different behavior if you call the function directly or through something that uses the interface, like we see with Matcher<Type>.</div>
<div style><br></div><div style>I'll send you a different CL with the change proposal.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  2. only have the DynTypedMatcher interface, and somehow break dynamically with an error message<br>
  other ideas?<br></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<a href="http://llvm-reviews.chandlerc.com/D714" target="_blank" class="cremed">http://llvm-reviews.chandlerc.com/D714</a><br>
<div class="HOEnZb"><div class="h5"><br></div></div></blockquote></div></div></div>