[clang] [clang][dataflow] Add captured parameters to ReferencedDecls for lamb… (PR #117771)

Yitzhak Mandelbaum via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 26 11:39:33 PST 2024


================
@@ -146,6 +146,10 @@ struct ReferencedDecls {
   /// Free functions and member functions which are referenced (but not
   /// necessarily called).
   llvm::DenseSet<const FunctionDecl *> Functions;
+  /// Parameters of other functions, captured by reference by a lambda. This is
----------------
ymand wrote:

I was confused before reading the code. It might be clearer to mention a "surrounding function" rather than "other functions". Maybe something like:
```
When analyzing a lambda's call operator, the set of all parameters (from the surrounding function) that the lambda captures by reference.
```

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


More information about the cfe-commits mailing list