I needed to extends Danial Marjamäki’s MisPlacedWideningCastCheck Tidy checker for implicit casts, and also for further use cases such as return values and function arguments. (Maybe the check for misplaced implicit casts should be an option.) My problem was that hasAnyArgument() currently skips implicit casts and parenthesized expressions. However, it contains a “FIXME” comment that this skipping will be removed in the future once ignoreImplicit() matcher is implemented. This matcher seems to be implemented, but its name is ignoreImpCasts(). Is it the same matchers?
To overcome the problem I temporarily implemented a matcher called hasAnyArgumentRaw(), which is in the same a file as the checker. The question is what is the acceptable solution now:
Leave the temporary matcher in the checker’s source
Move the matcher into ASTMatcher.h
Execute the FIXME, thus remove the skipping of implicit casts (and parenthesized expressions)
For me 3) seems to be the best final solution, but will it not break any existing checkers? 2) seems totally unacceptable for me.
Thanks for the answers!