================
@@ -107,19 +107,21 @@ void MissingStdForwardCheck::registerMatchers(MatchFinder 
*Finder) {
 
   auto CapturedInLambda = hasDeclContext(cxxRecordDecl(
       isLambda(),
-      hasParent(lambdaExpr(forCallable(equalsBoundNode("func")),
-                           anyOf(CapturedInCaptureList, CapturedInBody)))));
+      hasAncestor(lambdaExpr(forCallable(equalsBoundNode("func")),
+                             anyOf(CapturedInCaptureList, CapturedInBody)))));
----------------
zwuis wrote:

IIUC he meant writing a new matcher to check if the argument of `forward` 
refers to function parameter, so that we can handle any combination of `[&]` 
(implicit capture), `[&t]` (explicit capture), and `[&x = t]` (rename).

https://github.com/llvm/llvm-project/pull/178651
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to