[clang] [clang][dataflow] Add parameters of other functions to `LambdaCaptured… (PR #170311)

Samira Bakon via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 2 12:36:51 PST 2025


================
@@ -154,6 +154,14 @@ struct ReferencedDecls {
   /// When analyzing a lambda's call operator, the set of all parameters (from
   /// the surrounding function) that the lambda captures. Captured local
   /// variables are already included in `Locals` above.
+  ///
+  /// This set also includes any referenced parameters of functions other than
----------------
bazuzi wrote:

This change doesn't affect the visitation of lambda bodies.

The code change is quite general here, as you can see from the limited use of conditionals. The expected impact is quite narrow, though, because the triggering circumstances are rare and very specific. I rewrote this block of comments to try and clarify. Does that help?

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


More information about the cfe-commits mailing list