<div>+TEST(AllOF, CorrectOverloads) {</div><div>+  const char program[] =</div><div>+      "struct T { }; int f(int, T*); void g(int x) { T t; f(x, &t); }";</div><div><br></div><div>Should be Program (upper case). Everything else looks good IMO.</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 11, 2012 at 10:55 PM, Sam Panzer <span dir="ltr"><<a href="mailto:panzer@google.com" target="_blank">panzer@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Here is the fixed-up set of patches:<br><div class="gmail_extra"><br><br><div class="gmail_quote"><div class="im">On Tue, Jul 10, 2012 at 10:26 PM, Daniel Jasper <span dir="ltr"><<a href="mailto:djasper@google.com" target="_blank">djasper@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>Thanks for the patches. A few comments:</div><div><br></div>loop-matchers.patch:<div><div> </div><div>  +/// Example: </div>


<div>  +///     forSmt(hasIncrement(unaryOperator(hasOperatorName("++"))))</div></div>
<div><br></div></blockquote><div><br></div></div><div>Done.</div><div class="im"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div></div><div>Typo: Should be forStmt. Same in boths comments.</div>


<div><br></div><div><div>  +AST_MATCHER_P(clang::ForStmt, hasIncrement, internal::Matcher<clang::Stmt>,</div><div>  +              InnerMatcher) {</div>
</div><div><br></div><div>Remove all the "clang::" (here and everywhere else).</div></blockquote><div><br></div></div><div>Done.</div><div class="im"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div><br></div><div><div>  +TEST(For, NegativeForLoopInternals) {</div><div>  +  EXPECT_FALSE(matches("void f(){ for (int i = 0; ; ++i); }",</div>
</div><div><br></div><div>We prefer "EXPECT_TRUE(notMatches(". I think "EXPECT_FALSE(matches(" will always pass if there are syntax errors.</div><div><br></div></blockquote><div><br></div></div><div>Done. </div>


<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div></div><div><br></div><div>isInteger.patch:</div>
<div>Use EXPECT_TRUE(notMatches(.</div><div><br></div></blockquote><div><br></div><div>Done.</div><div class="im"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div></div>

<div><br></div><div>allof.patch:</div><div><br></div><div><div>  +TEST(AllOF, CorrectOverloads) {</div></div><div><br></div><div>nit: AllOf</div><div>also: The test name could contain a bit more information. What does it actually test?</div>


</blockquote><div><br></div></div><div>When I first tried to use allOf with three parameters, I got a compiler error complaining about an undefined symbol 'AllOf'. I created this test to try to catch the original error, which is triggered if the test case is added but the spelling change in ASTMatchers.h is not. I renamed the test AllOf.AllOverloadsWork, which I think is a little clearer.</div>
<div class="im">

<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On Wed, Jul 11, 2012 at 1:11 AM, Sam Panzer <span dir="ltr"><<a href="mailto:panzer@google.com" target="_blank">panzer@google.com</a>></span> wrote:<br>


</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>
<div>There are three patches attached here. One adds matchers for the various parts of a for loop (initializer, condition, increment), as well as extending the hasBody matcher to work for while and do-while loops. The second patch adds an isInteger matcher for types.</div>




<div>The third patch fixes a bug in allOf, where a few of the name chages (AllOf --> allOf) had been missed.</div><div><br></div><div>All matchers come with unit tests.</div><div><br></div><div>Thoughts?</div><span><font color="#888888"><div>



-Sam</div>
</font></span><br></div></div>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div>
</blockquote></div></div><br></div>
</blockquote></div><br></div>