[PATCH] D17986: [ASTMatchers] Existing matcher hasAnyArgument fixed and new matcher hasReturnValue added

Samuel Benzaquen via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 11 11:31:39 PST 2016


sbenza added a comment.

> I will separate it, OK. In the Clang there is one use case that I fixed, although it did not break the tests. Neither of the other "has..." checkers (except the general ones) ignore implicit casts and parenthesized expressions so this one should not do it either because it makes checking implicit casts impossible.


I agree that we want it, just wanted to point out that it has to be done with care.

> Matcher "hasReturnValue" is needed because "has" ignores all implicit casts and parenthesized expressions and we need to the check implicit casts. I will add a test and add it to the dynamic registry.


I see. has() suffers from the same problem. Then it makes sense.


http://reviews.llvm.org/D17986





More information about the cfe-commits mailing list