mirror of
https://github.com/github/codeql.git
synced 2025-12-20 10:46:30 +01:00
Python: Small rewrite of **kwargs getParameter logic
This commit is contained in:
committed by
GitHub
parent
cef933f813
commit
a1c2f4c138
@@ -351,15 +351,10 @@ abstract class DataFlowFunction extends DataFlowCallable, TFunction {
|
||||
// synthetic to the real. It might seem more natural to do it in the other
|
||||
// direction, but since we have a clearStep on the real **kwargs parameter, we that
|
||||
// content-clearing would also affect the synthetic parameter, which we don't want.
|
||||
(
|
||||
not exists(func.getArgByName(_)) and
|
||||
ppos.isDictSplat() and
|
||||
result.getParameter() = func.getKwarg()
|
||||
or
|
||||
exists(func.getArgByName(_)) and
|
||||
ppos.isDictSplat() and
|
||||
result = TSynthDictSplatParameterNode(this)
|
||||
)
|
||||
ppos.isDictSplat() and
|
||||
if exists(func.getArgByName(_))
|
||||
then result = TSynthDictSplatParameterNode(this)
|
||||
else result.getParameter() = func.getKwarg()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user