[PATCH] D128314: [Clang-tidy] Fixing a bug in clang-tidy infinite-loop checker
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 23 09:44:23 PDT 2022
NoQ added a comment.
Nice!
There's usually some bureaucracy when creating new matchers, i.e. there should be documentation and unittests covering them.
================
Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:5099
+/// matches a FunctionType if the type includes the GNU no return attribute
+AST_MATCHER(FunctionType, typeHasNoReturnAttr) {
+ return Node.getNoReturnAttr();
----------------
Can we make a polymorphic matcher `hasNoReturnAttr` that can accept either decl or type?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128314/new/
https://reviews.llvm.org/D128314
More information about the cfe-commits
mailing list