[cfe-dev] Question regarding hasCastKind matcher
Farzad Sadeghi via cfe-dev
cfe-dev at lists.llvm.org
Sun Dec 4 02:20:07 PST 2016
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?
--
Farzad Sadeghi
More information about the cfe-dev
mailing list