[PATCH] D20052: Add new ASTMatcher that matches dynamic exception specifications.

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon May 16 08:15:42 PDT 2016

aaron.ballman requested changes to this revision.
aaron.ballman added a comment.
This revision now requires changes to proceed.

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?

Comment at: include/clang/ASTMatchers/ASTMatchers.h:3251
@@ +3250,3 @@
+///   matches the declarations of f, i, and j but not g or h.
+AST_MATCHER(FunctionDecl, isThrow) {
+  if (const auto *FnTy = Node.getType()->getAs<FunctionProtoType>())
I'm not comfortable with this matcher; users can use `unless(isNoThrow())` to get this behavior already.


More information about the cfe-commits mailing list