Danny =?utf-8?q?Mösch?= <[email protected]>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/[email protected]>
================
@@ -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
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits