Add new ASTMatcher that matches dynamic exception specifications.
It's a bit odd to expose this on the declaration instead of the type since the AST carries this information on the type, not the declaration. I definitely see the utility in not having to go from the decl to the type in an AST matcher, though. Can you expose it on both FunctionDecl and FunctionProtoType instead?
It's modeled on the isNoThrow matcher directly below which used FunctionDecl, so I used it for this one too.
Did you want me change this one to use FunctionProtoType or add 2 matchers, one using FunctionDecl and another one using FunctionProtoType?
I'm not keen on the new direction this patch has taken. hasDynamicExceptionSpec(isThrow()) is quite novel. What is the problem you are trying to solve with this?
I'm not comfortable with this matcher; users can use unless(isNoThrow()) to get this behavior already.
Great, unless() was what I was missing. I'll refactor along those lines.
As for what I'm trying to achieve, I want a set containing "throw()" and another set containing "throw(something)". If there's a cleaner way to achieve that with an existing matcher, please let me know.