hintonda added inline comments.
================
Comment at: include/clang/ASTMatchers/ASTMatchers.h:3229
@@ +3228,3 @@
+/// matches the declarations of j, k, and l, but not f, g, h, or i.
+AST_MATCHER(FunctionDecl, hasDynamicExceptionSpec) {
+ if (const auto *FnTy = Node.getType()->getAs<FunctionProtoType>())
----------------
aaron.ballman wrote:
> 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?
http://reviews.llvm.org/D20052
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits