[PATCH] D33094: [ASTMatchers] Add clang-query support for equals matcher

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 22 05:05:13 PDT 2017

aaron.ballman added inline comments.

Comment at: include/clang/ASTMatchers/ASTMatchers.h:3846
+                                                          CXXBoolLiteralExpr,
+                                                          IntegerLiteral),
+                          unsigned, Value, 1) {
Lekensteyn wrote:
> aaron.ballman wrote:
> > Is there a reason to not allow the equals matcher to do something like `floatingLiteral(equals(1))`? Sure, the user could always write `1.0`, but it seems somewhat hostile to require it.
> The ValueMatcher for float does not accept integers at the moment, adding FloatingLiteral now results in a compile error. It can be added though (might do this as well in the next revision, either in the existing patches or a new one).
That's a good reason not to do it right now. Thanks!


More information about the cfe-commits mailing list