[clang] [webkit.UncountedLambdaCapturesChecker] Treat a call to lambda function via a variable as safe. (PR #135688)

Ryosuke Niwa via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 24 15:20:09 PDT 2025


================
@@ -372,6 +372,14 @@ void trivial_lambda() {
   trivial_lambda();
 }
 
+bool call_lambda_var_decl() {
+  RefCountable* ref_countable = make_obj();
+  auto lambda = [&]() -> bool {
+    return ref_countable->next();
+  };
+  return lambda();
+}
+
----------------
rniwa wrote:

Sure, added.

https://github.com/llvm/llvm-project/pull/135688


More information about the cfe-commits mailing list