-
Notifications
You must be signed in to change notification settings - Fork 15.4k
[clang][dataflow] Add parameters of other functions to `LambdaCaptured… #170311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe a little simpler (of possibly losing some information): ... This supports the collection of |
||
| /// ReferencedDecls from a DeclStmt constructed for lambda init-capture | ||
| /// VarDecls for the purpose of performing a dataflow analysis on the | ||
| /// declaration/initialization. When analyzing any `FunctionDecl`, this set | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. super nit: I might preface with "Note:" to highlight that this is an aside and no longer describing the variable. |
||
| /// would also include any parameters of other functions that are referenced | ||
| /// in the analyzed function's body, though there is no known case where this | ||
| /// happens. If other (especially non-lambda-related) cases are found, this | ||
| /// group of parameters could be moved out of `LambdaCapturedParams` into a | ||
| /// separate set. | ||
| llvm::SetVector<const ParmVarDecl *> LambdaCapturedParams; | ||
| }; | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.