Question regarding hasCastKind matcher

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?

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

Good!

In the future, please keep the mailing list as recipient when replying
to allow others to see the discussion.

Best regards
David

that works on clang-query but clang will require the CastKind as
argument to work, not a string.