[cfe-dev] Question regarding hasCastKind matcher
David _ via cfe-dev
cfe-dev at lists.llvm.org
Sun Dec 4 08:01:27 PST 2016
Good!
In the future, please keep the mailing list as recipient when replying
to allow others to see the discussion.
Best regards
David
2016-12-04 16:57 GMT+01:00 Farzad Sadeghi <thabogre at gmail.com>:
> thanks. that works.
>
> On 12/4/16, David _ <dwiberg at gmail.com> wrote:
>> 2016-12-04 11:20 GMT+01:00 Farzad Sadeghi via cfe-dev
>> <cfe-dev at lists.llvm.org>:
>>> what should be the input to the hasCAstKind matcher?
>>> the documentation says "CastKind Kind".
>>> so i wrote this matcher:
>>> castExpr(hasCastKind(CK_ArrayToPointerDecay))
>>>
>>> but clang-query returns this:
>>> 1:2: Error parsing argument 1 for matcher castExpr.
>>> 1:11: Error parsing argument 1 for matcher hasCastKind.
>>> 1:25: Error parsing matcher. Found token <_> while looking for '('.
>>>
>>> so i thought maybe i should give it a string:
>>> castExpr(hasCastKind("CK_ArrayToPointerDecay"))
>>>
>>> but then i get this:
>>> 1:2: Error parsing argument 1 for matcher castExpr.
>>> 1:11: Error building matcher hasCastKind.
>>> 1:23: Incorrect type for arg 1. (Expected = string) != (Actual = String)
>>>
>>> what should the input be?
>>
>> Hi,
>>
>> Try: match castExpr(hasCastKind("ArrayToPointerDecay"))
>>
>> Best regards
>> David
>>
>>> --
>>> Farzad Sadeghi
>>> _______________________________________________
>>> cfe-dev mailing list
>>> cfe-dev at lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>>
>
>
> --
> Farzad Sadeghi
More information about the cfe-dev
mailing list