================ @@ -106,6 +107,26 @@ class UncountedLambdaCapturesChecker return safeGetName(NsDecl) == "WTF" && safeGetName(Decl) == "switchOn"; } + bool VisitCXXConstructExpr(CXXConstructExpr *CE) override { + if (ConstructToIgnore.contains(CE)) + return true; + if (auto *Callee = CE->getConstructor()) { + unsigned ArgIndex = 0; + for (auto *Param : Callee->parameters()) { + if (ArgIndex >= CE->getNumArgs()) + return true; + auto *Arg = CE->getArg(ArgIndex)->IgnoreParenCasts(); + if (auto *L = findLambdaInArg(Arg)) { ---------------- t-rasmud wrote:
For my understanding: Is the LambdaExpr not covered in `VisitLambdaExpr`? What's special about the expression being an argument to a constructor? https://github.com/llvm/llvm-project/pull/126869 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits