LegalizeAdulthood added inline comments.

================
Comment at: unittests/ASTMatchers/ASTMatchersTest.cpp:4282
@@ +4281,3 @@
+  EXPECT_TRUE(matches("void f(int i);", functionProtoType()));
+  EXPECT_TRUE(matches("void f();", functionProtoType(parameterCountIs(0))));
+  EXPECT_TRUE(
----------------
aaron.ballman wrote:
> This isn't quite what I had in mind. The test you added is a good one to add, 
> but I wanted a test that functionProtoType() does *not* match f() (because it 
> has no prototype), and another test for parameterCountIs() that it does't 
> explode on a function without a prototype in C.
I don't  understand what would be tested by adding a test for 
`parameterCountIs()` on a function that doesn't have a prototype since it is a 
nested matcher passed to `functionProtoType()` and since the function doesn't 
have a prototype, that outer matcher won't match.


http://reviews.llvm.org/D8149



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to