How do I go about writing the matchers I need, such as objcMessageExpr
and hasSelector? I took a whack at the writing objcMessageExpr and
promptly got lost in failed template instantiation errors.
In the source tree, check out clang/include/clang/ASTMatchers/ASTMatchersMacros.h for the macros used for writing matchers, and clang/include/clang/ASTMatchers/ASTMatchers.h to look at how existing matchers are implemented.
How do I go about writing the matchers I need, such as objcMessageExpr
and hasSelector? I took a whack at the writing objcMessageExpr and
promptly got lost in failed template instantiation errors.
If you have a more concrete example of what you tried it would be easier to help
I’d already read the matcher guide, as well as reading through the suggested .h files. Sadly, I completely missed seeing that the various .cc files that implement the matchers lacked imports of the *ObjC.h files from the AST. Adding those imports has made my compilation errors evaporate. I’m back to making progress!