================
@@ -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
+  /// empty except when ReferencedDecls are computed for a lambda's call
+  /// operator.
+  llvm::DenseSet<const ParmVarDecl *> LambdaCapturedParams;
----------------
bazuzi wrote:

Other captured locals are already included by the existing traversal. We also 
see the parameters in the insertIfLocal case, but currently exclude parameters 
in order to exclude the current function's parameters. If we wanted to change 
that restriction to not exclude captured parameters, we'd have to check each 
one to see if it is a capture or a parameter of the current function, each time 
they are seen in the function. This is the alternative I allude to in the 
commit description.

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

Reply via email to