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

Yitzhak Mandelbaum via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 2 13:43:53 PST 2025


================
@@ -154,6 +154,17 @@ 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.
+  ///
+  /// When analyzing a standalone `Stmt` directly, this set includes any
+  /// referenced function parameters. This supports the collection of
----------------
ymand wrote:

Maybe a little simpler (of possibly losing some information):

   ... This supports the collection of
  /// ReferencedDecls from a DeclStmt constructed for analysis of lambda init-capture
  /// VarDecls. 

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


More information about the cfe-commits mailing list