Merge pull request #13255 from hvitved/ruby/ssa-param-capture-input

Ruby: Include underlying SSA parameter definition in `localFlowSsaParamCaptureInput`
This commit is contained in:
Tom Hvitved 2023-05-24 10:40:54 +02:00 коммит произвёл GitHub
Родитель eea972b205 eaa84cb819
Коммит b486a4d52c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 6 добавлений и 5 удалений

Просмотреть файл

@ -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()
) )
} }