[PATCH] D44729: [ASTMatchers] Add hasSubExpr() matcher.

2018-03-21 Thread Clement Courbet via Phabricator via cfe-commits
courbet added a comment. Thanks for the pointer. I missed the trampoline through GetSourceExpressionMatcher. Repository: rC Clang https://reviews.llvm.org/D44729 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D44729: [ASTMatchers] Add hasSubExpr() matcher.

2018-03-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I think `hasSourceExpression()` already does what you're looking for. void f() { int i = 1.0f; } clang-query> match implicitCastExpr(hasSourceExpression(floatLiteral())) Match #1: C:\Users\aballman.GRAMMATECH\Desktop\test.c:2:11: note: "root" binds here

[PATCH] D44729: [ASTMatchers] Add hasSubExpr() matcher.

2018-03-21 Thread Clement Courbet via Phabricator via cfe-commits
courbet created this revision. courbet added reviewers: aaron.ballman, alexfh. Herald added a subscriber: klimek. This is needed to implement more checks in https://reviews.llvm.org/D38455. Repository: rC Clang https://reviews.llvm.org/D44729 Files: docs/LibASTMatchersReference.html