[PATCH] AST matcher for catch(...)

Manuel Klimek klimek at google.com
Wed Jul 1 21:47:15 PDT 2015


Looks good. Thanks!

On Wed, Jul 1, 2015 at 11:16 PM Aaron Ballman <aaron at aaronballman.com>
wrote:

> I was making a brief foray into AST matchers over exception handling
> code today, and I noticed there's no way (that I could find) to match
> only catch-all exception handlers. Eg)
>
> try {
> } catch (int) {
> } catch (...) { // Only want to match this
> }
>
> The attached patch adds the matcher, test case, and documentation for
> such a thing. I am not strongly tied to "catch all" as the name, but
> alternatives like "handlesAnyType" sound like it would match
> catch(int) as well as catch(...). If there's a better name, I'd be
> happy to make use of it.
>
> Thanks!
>
> ~Aaron
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150702/7e34d022/attachment.html>


More information about the cfe-commits mailing list