================ @@ -45,8 +49,62 @@ class UncountedLambdaCapturesChecker bool shouldVisitTemplateInstantiations() const { return true; } bool shouldVisitImplicitCode() const { return false; } - bool VisitLambdaExpr(LambdaExpr *L) { - Checker->visitLambdaExpr(L); + bool VisitDeclRefExpr(DeclRefExpr *DRE) { + if (DeclRefExprsToIgnore.contains(DRE)) + return true; + if (auto *VD = dyn_cast_or_null<VarDecl>(DRE->getDecl())) { + auto *Init = VD->getInit()->IgnoreParenCasts(); + if (auto *L = dyn_cast_or_null<LambdaExpr>(Init)) { + Checker->visitLambdaExpr(L); + return true; + } + } + return true; ---------------- t-rasmud wrote:
Is the return value in both the true and the false cases of the branch supposed to be `true`? https://github.com/llvm/llvm-project/pull/113845 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits