python: capture flow through comprehensions

- add comprehension functions as `DataFlowCallable`s
- add comprehension call as `DataFlowCall`
- create capture argument node for comprehension calls
This commit is contained in:
Rasmus Lerchedahl Petersen
2024-09-25 10:02:31 +02:00
parent 4dbb15ddda
commit fc2dc28f87
2 changed files with 47 additions and 1 deletions

View File

@@ -137,7 +137,7 @@ def test_list_comprehension_with_tuple_result():
s = SOURCE
ns = NONSOURCE
l3 = [(s, ns) for _ in [1]]
SINK(l3[0][0]) # $ MISSING: flow="SOURCE, l:-3 -> l3[0][0]"
SINK(l3[0][0]) # $ flow="SOURCE, l:-3 -> l3[0][0]"
SINK_F(l3[0][1])