This adds support for giving hints when using dynamic matchers with enum args. Take this query, I couldn't figure out why the matcher wasn't working:
(Turns out it needed to be "IntegralToBoolean", but thats another bug itself)
clang-query> match implicitCastExpr(hasCastKind("CK_IntegralToBoolean")) 1:1: Error parsing argument 1 for matcher implicitCastExpr. 1:18: Error building matcher hasCastKind. 1:30: Incorrect type for arg 1. (Expected = string) != (Actual = String)
With this patch the new behaviour looks like this:
clang-query> match implicitCastExpr(hasCastKind("CK_IntegralToBoolean")) 1:1: Error parsing argument 1 for matcher implicitCastExpr. 1:18: Error building matcher hasCastKind. 1:30: Unknown value 'CK_IntegralToBoolean' for arg 1; did you mean 'IntegralToBoolean'
There are no test cases for this yet as there simply isn't any infrastructure for testing errors reported when parsing args that I can see.
We usually try to keep these lists in alphabetical order. Would you mind hoisting this up a bit (feel free to change VariantValue.cpp as a driveby if you want, or just leave it there)?