Skip to content

Commit ded3974

Browse files
committed
Python: allow comp arg as argumentnode
1 parent f9f46f0 commit ded3974

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

python/ql/lib/semmle/python/dataflow/new/internal/DataFlowDispatch.qll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,10 @@ newtype TArgumentPosition =
163163
// position, we need to ensure we make these available (these are specified as
164164
// parameters in the flow-summary spec)
165165
FlowSummaryImpl::ParsePositions::isParsedPositionalParameterPosition(_, index)
166+
or
167+
// the generated function inside a comprehension has a positional argument at index 0
168+
exists(Comp c) and
169+
index = 0
166170
} or
167171
TKeywordArgumentPosition(string name) {
168172
exists(any(CallNode c).getArgByName(name))

0 commit comments

Comments
 (0)