[PATCH] ASTMatchers: Add support for Objective-C
Manuel Klimek
klimek at google.com
Tue Aug 26 00:54:36 PDT 2014
Apart from the code layout (and that I have no idea about Obj-C) looks good.
Please also don't forget to update the docs:
$ cd docs/tools
$ python dump_ast_matchers.py
================
Comment at: include/clang/ASTMatchers/ASTMatchers.h:3713-3714
@@ +3712,4 @@
+/// matches '[_ivar release]', '[super dealloc]' and '[NSArray alloc]'.
+const internal::VariadicDynCastAllOfMatcher<Stmt, ObjCMessageExpr>
+ objCMessageExpr;
+
----------------
I'd prefer grouping this with the other node matchers on top of the file.
================
Comment at: unittests/ASTMatchers/ASTMatchersTest.cpp:4456
@@ -4455,1 +4455,3 @@
+TEST(ObjectiveC, ObjCMessageExpr) {
+ EXPECT_TRUE(matchesWithObjC(
----------------
I assume we'll have more obj-c stuff coming, and this already compiles pretty slow, so I'd prefer to split out an ASTMatchersObjCTest.cpp/.h unless you see specific reasons not to do that.
http://reviews.llvm.org/D5056
More information about the cfe-commits
mailing list