[cfe-dev] [AST Matchers] has matcher bug?

Piotr Padlewski via cfe-dev cfe-dev at lists.llvm.org
Sun May 15 06:06:01 PDT 2016


Thanks for response Alexey.
Is there any reason why it do so? This is very unintuitive and it also
makes it harder and uglier to use matchers - instead of saying
something(has(something2())) I have to say
something2(hasParent(something())).

Piotr

2016-05-15 13:38 GMT+02:00 Alexey Sidorin <alexey.v.sidorin at ya.ru>:

> Hello Piotr,
>
> has() matcher ignores implicit casts and parens. That's not a bug
> (however, it will be good to point it in doxygen).
>
>
> 13.05.2016 15:27, Piotr Padlewski via cfe-dev пишет:
>
> I am have a problem with has matcher. It doesn't work for cases like
> implicitCastExpr(has(implicitCastExpr()))
> or
>
> cxxMemberCallExpr(has(materializeTemporaryExpr())))
>
> or
>
> returnStmt(has(implicitCastExpr()))
>
> Here is a bug in bugzilla
>
> https://llvm.org/bugs/show_bug.cgi?id=27713
>
> Am I doing something wrong or it is a bug? This thing blocks me on 2 clang-tidy checks that I am working on.
>
> Thanks
>
> Piotr
>
>
>
> _______________________________________________
> cfe-dev mailing listcfe-dev at lists.llvm.orghttp://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160515/498dbb8a/attachment.html>


More information about the cfe-dev mailing list