Java: Bugfix for samevar in useReaches.

This commit is contained in:
Anders Schack-Mulligen
2025-02-10 09:53:14 +01:00
committed by Tom Hvitved
parent ed284353ef
commit e955f58eb1

View File

@@ -619,13 +619,12 @@ private module Cached {
useReaches(use, mid, sameVarMid) and
DataFlowIntegration::localFlowStep(_, mid, node, _)
|
// flow into phi input node
mid instanceof DataFlowIntegration::SsaInputNode and
sameVar = false
or
// flow into definition
exists(Impl::DefinitionExt def |
// flow into definition
def = mid.(DataFlowIntegration::SsaDefinitionExtNode).getDefinitionExt()
or
// flow into phi input node
def = mid.(DataFlowIntegration::SsaInputNode).getDefinitionExt()
|
if def instanceof Impl::PhiReadNode then sameVar = sameVarMid else sameVar = false
)