[PATCH] Replace overloaded ASTMatchFinder::addMatcher() function with one that takes a DynTypedMatcher.
Manuel Klimek
klimek at google.com
Fri May 10 01:46:47 PDT 2013
After thinking about this I don't believe we want the interface change:
This would allow users to put arbitrary matchers to addMatcher(...), and would thus lead to confusion when those matchers don't match (as they cannot match).
The trick is that the dynamic matchers already do that kind of checking on their own (I hope :); the question is: do they know the entry point type, and can they use the matcher with the correct type?
Otherwise, I'd suggest adding a method with a different name, like
addDynamicMatcher(...) which clearly says that using this method will circumvent type checking, and thus can lead to matchers unexpectedly not matching.
http://llvm-reviews.chandlerc.com/D770
More information about the cfe-commits
mailing list