зеркало из https://github.com/github/codeql.git
Merge pull request #13255 from hvitved/ruby/ssa-param-capture-input
Ruby: Include underlying SSA parameter definition in `localFlowSsaParamCaptureInput`
This commit is contained in:
Коммит
b486a4d52c
|
@ -144,12 +144,13 @@ module LocalFlow {
|
||||||
* This is intended to recover from flow not currently recognised by ordinary capture flow.
|
* This is intended to recover from flow not currently recognised by ordinary capture flow.
|
||||||
*/
|
*/
|
||||||
predicate localFlowSsaParamCaptureInput(Node nodeFrom, Node nodeTo) {
|
predicate localFlowSsaParamCaptureInput(Node nodeFrom, Node nodeTo) {
|
||||||
exists(Ssa::CapturedEntryDefinition def |
|
exists(Ssa::CapturedEntryDefinition def, ParameterNodeImpl p |
|
||||||
nodeFrom.asParameter().(NamedParameter).getVariable() = def.getSourceVariable()
|
(nodeFrom = p or LocalFlow::localFlowSsaParamInput(p, nodeFrom)) and
|
||||||
or
|
|
||||||
nodeFrom.(SelfParameterNode).getSelfVariable() = def.getSourceVariable()
|
|
||||||
|
|
|
||||||
nodeTo.(SsaDefinitionExtNode).getDefinitionExt() = def
|
nodeTo.(SsaDefinitionExtNode).getDefinitionExt() = def
|
||||||
|
|
|
||||||
|
p.getParameter().(NamedParameter).getVariable() = def.getSourceVariable()
|
||||||
|
or
|
||||||
|
p.(SelfParameterNode).getSelfVariable() = def.getSourceVariable()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче