Danny =?utf-8?q?Mösch?= <danny.moe...@icloud.com> Message-ID: In-Reply-To: <llvm.org/llvm/llvm-project/pull/87...@github.com>
================ @@ -125,12 +127,13 @@ void MissingStdForwardCheck::registerMatchers(MatchFinder *Finder) { hasAncestor(expr(hasUnevaluatedContext()))))); Finder->addMatcher( - parmVarDecl(parmVarDecl().bind("param"), isTemplateTypeParameter(), - hasAncestor(functionDecl().bind("func")), - hasAncestor(functionDecl( - isDefinition(), equalsBoundNode("func"), ToParam, - unless(anyOf(isDeleted(), hasDescendant(std::move( - ForwardCallMatcher))))))), + parmVarDecl( + parmVarDecl().bind("param"), hasAnyName(), isTemplateTypeParameter(), ---------------- PiotrZSL wrote: You should also ignore unused variables, like `[[maybe_unused]]` with: ``` unless(hasAttr(attr::Kind::Unused)), ``` And you could also use: ``` unless(isReferenced()), with: AST_MATCHER(VarDecl, isReferenced) { return Node.isReferenced(); } ``` https://github.com/llvm/llvm-project/pull/87832 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits