[PATCH] First revision of the dynamic ASTMatcher library
sbenza at google.com
Wed May 8 08:21:14 PDT 2013
This diff fixes the ASTMatchers tests broken by this CL.
The problem is that adding an overload ASTMatchFinder::addMatcher(const DynTypedMatcher&) is changing the behavior of certain expressions.
In particular, any Matcher<Type> was being implicitly converted to Matcher<QualType> on the addMatcher() call to match one of the overloads.
After I added the overload with the interface, that one is a better match than the one that performs the conversion so no conversion is done.
However, the code was trying to match with a QualType and the underlying Matcher<Type> did not match.
I changed the logic on DynTypedNode to return a Type* even when the stored value is a QualType. This fixes the issue by allowing a Matcher<Type> match a QualType dyn node.
Hi doug.gregor, klimek,
CHANGE SINCE LAST DIFF
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 69084 bytes
Desc: not available
More information about the cfe-commits