[PATCH] D20052: Add new ASTMatcher that matches dynamic exception specifications.
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Tue May 10 08:44:25 PDT 2016
aaron.ballman added a subscriber: aaron.ballman.
aaron.ballman added a reviewer: aaron.ballman.
================
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>())
----------------
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?
http://reviews.llvm.org/D20052
More information about the cfe-commits
mailing list