Introduces a new concept for binding results to matchers
as per Chandler's request: - introduces a new matcher base type BindableMatcher that provides the bind() call - makes all dynamic-cast matcher creation functions return BindableMatchers; the special case about dynamic-cast matchers is that the node they match on and the node their child matchers match on are the same node, just casted to a different type; thus, there is no ambiguity on what bind() matches on; additionally, those are the matchers that we name with nouns in the matcher language, so it's easy for users to intuitively know which matchers are bindable To make this change possible, we got rid of a non-orthogonal implementation of thisPointerType, which had an implicit dynamic-cast matcher from CallExpr to CXXMemberCallExpr; as alternative, we now provide a memberCall dynamic-cast matcher and thisPointerType is a predicate on CXXMemberCallExpr. Last, the ArgumentAdaptingMatcher is actually not required for the implementation of makeDynCastAllOfComposite - this simplification makes it more obvious where the bind() call can be used based on the matcher creation function types. llvm-svn: 160673
Loading
Please register or sign in to comment