You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/ql-libraries/dataflow/dataflow.md
+39Lines changed: 39 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -186,6 +186,45 @@ values, for example through `out` parameters in C#, the `ReturnKind` class can
186
186
be defined and used to match up different kinds of `ReturnNode`s with the
187
187
corresponding `OutNode`s.
188
188
189
+
#### First-class functions
190
+
191
+
For calls to first-class functions, the library supports built-in call resolution based on data flow between a function creation expression and a call. The interface that needs to be implemented is
192
+
193
+
```ql
194
+
class LambdaCallKind
195
+
196
+
/** Holds if `creation` is an expression that creates a lambda of kind `kind` for `c`. */
197
+
predicate lambdaCreation(Node creation, LambdaCallKind kind, DataFlowCallable c)
198
+
199
+
/** Holds if `call` is a lambda call of kind `kind` where `receiver` is the lambda expression. */
0 commit comments