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

  int i = 1.0f;
          ^~~~

1 match.


Repository:
  rC Clang

https://reviews.llvm.org/D44729



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to