<div dir="ltr">We could also just add nothing() matcher, so debugging would be much easier, just add anything() or nothing() matcher as extra argument.<div><br></div><div>The other pros of it is that new developers won't send the patches that uses those variadic matchers with only one argument.</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-07-26 16:02 GMT-07:00 Zac Hansen via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span style="font-size:12.8px">Even if it still did add overhead, it seems perfectly reasonable, from a user's perspective (namely mine), that if I introduce unnecessary narrowing matchers to my chain that there may be a performance penalty.   </span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">The ability to do the following easily outweighs any performance issues for me:</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">anyOf (</div><div style="font-size:12.8px">/*    hasName("..."), */</div><div style="font-size:12.8px">    hasName("...")</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">)</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">though C++ not allowing trailing commas makes this not quite as great.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><b>However, without help, I would not be able to put forward a patch with anything more than simply removing the minimums.</b></div><div style="font-size:12.8px"><b><br></b></div><div style="font-size:12.8px">Would this be acceptable or would someone be able to point me at what it would take to do it the "smart way" in less time than it would take them to make the change themselves?</div><div style="font-size:12.8px"></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 26, 2016 at 3:29 PM, Samuel Benzaquen <span dir="ltr"><<a href="mailto:sbenza@google.com" target="_blank">sbenza@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">One of the reasons we added the minimum was because these nodes added overhead to the matching that was not unnecessary when they only had a single node.<div>On the current implementation we could actually get rid of the node completely for the one argument calls.</div><div>I would be ok with removing the lower bound.<div><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 26, 2016 at 6:20 PM, Zac Hansen <span dir="ltr"><<a href="mailto:xaxxon@gmail.com" target="_blank">xaxxon@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I was wondering if there is any objection to removing the 2-element minimum on the eachOf, anyOf and allOf matchers.<div><br></div><div>It is frustrating when playing with matchers to have to edit significant amounts of code to be able to temporarily go from 2 to 1 matcher inside an any- or allOf matcher.</div><div><br></div><div>And overall it feels very "un-set-theory"-like.</div><div><br></div><div>The change was made here: <a href="https://github.com/llvm-mirror/clang/commit/674e54c167eab0be7a54bca7082c07d2f1d0c8cc" target="_blank">https://github.com/llvm-mirror/clang/commit/674e54c167eab0be7a54bca7082c07d2f1d0c8cc</a></div><div><br></div><div><br></div><div>Thank you and apologies if I sent this to the wrong lists/people.</div><span><font color="#888888"><div><br></div><div>--Zac</div></font></span></div>
</blockquote></div><br></div></div></div></div></div>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div>