================ @@ -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)) { ---------------- rniwa wrote:
Oh, so we wanna ignore lambda expressions that are passed to `[[clang::noescape]]`. The code in `VisitCallExpr` and now `VisitCXXConstructExpr` is there to detect this specific case, and then ignore the argument. 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