ziqingluo-90 added a comment. In D128314#3605588 <https://reviews.llvm.org/D128314#3605588>, @NoQ wrote:
> Nice! > > There's usually some bureaucracy when creating new matchers, i.e. there > should be documentation and unittests covering them. I have added a unit test and auto-generated document for it. ================ 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(); ---------------- NoQ wrote: > Can we make a polymorphic matcher `hasNoReturnAttr` that can accept either > decl or type? I've moved these two matchers, which seems are specific to the infinite loop checker, to `InfiniteLoopCheck.cpp`. Maybe they no longer need to be generalized by polymorphism. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128314/new/ https://reviews.llvm.org/D128314 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits