================
@@ -45,32 +52,119 @@ class UncountedLambdaCapturesChecker
       bool shouldVisitTemplateInstantiations() const { return true; }
       bool shouldVisitImplicitCode() const { return false; }
 
-      bool VisitLambdaExpr(LambdaExpr *L) {
-        Checker->visitLambdaExpr(L);
+      bool TraverseDecl(Decl *D) {
+        if (auto *CXXMD = dyn_cast<CXXMethodDecl>(D)) {
----------------
haoNoQ wrote:

Just use `TraverseCXXMethodDecl()` instead?

I'm also not sure it actually works. Looks like you're trying to capture the 
global "this" type to use inside lambdas where `this` has a different meaning. 
But doesn't this method also act on the lambda's own overloaded `operator()()` 
(which is also a method) defeating the purpose? Or do we already skip it in a 
different place?

https://github.com/llvm/llvm-project/pull/114897
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to