================ @@ -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())) { ---------------- t-rasmud wrote:
Would be great if we can continue the "early return coding style" like in the 2 lines above: ``` auto *VD = dyn_cast_or_null<VarDecl>(DRE->getDecl()); if (!VD) return false; ``` Same comment for the following lines and for code in `VisitCallExpr` 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