ASTMatchers and empty string literals

I want to do a matcher that would naively be spelt stringLiteral(equals("")), but that won't compile, complaining that (I think) "" is not a valid array initialiser.

So, is there a more correct way to spell that? Or have I found another bug?

Andrew

I want to do a matcher that would naively be spelt stringLiteral(equals("")), but that won't compile, complaining that (I think) "" is not a valid array initialiser.

So, is there a more correct way to spell that? Or have I found another bug?

equals is currently not usable for string literals, as clang's
StringLiteral class doesn't have a getValue() method (the doxygen says
it's usable for character-, bool-, floating- and integer-literals).

The quick workaround is to bind the string literal, and do the check
in the callback. For feature requests in the matchers, please always
feel free to file a bug in clang and cc' it to me.

Cheers,
/Manuel