From db7ec4a781cb505c9055d8cf3875da0e763c5655 Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Mon, 24 Feb 2025 13:50:08 +0100 Subject: [PATCH] Java: Remove getDefinitionExt reference --- .../semmle/code/java/dataflow/internal/DataFlowNodes.qll | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowNodes.qll b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowNodes.qll index df9a487a2c1..fd14bcfd100 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowNodes.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowNodes.qll @@ -167,7 +167,7 @@ module Public { or result instanceof TypeObject and this instanceof AdditionalNode or - result = this.(SsaNode).getDefinitionExt().getSourceVariable().getType() + result = this.(SsaNode).getTypeImpl() } /** Gets the callable in which this node occurs. */ @@ -394,7 +394,9 @@ class SsaNode extends Node, TSsaNode { SsaNode() { this = TSsaNode(node) } - SsaImpl::Impl::DefinitionExt getDefinitionExt() { result = node.getDefinitionExt() } + BasicBlock getBasicBlock() { result = node.getBasicBlock() } + + Type getTypeImpl() { result = node.getSourceVariable().getType() } override Location getLocation() { result = node.getLocation() } @@ -442,7 +444,7 @@ module Private { result.asCallable() = n.(CaptureNode).getSynthesizedCaptureNode().getEnclosingCallable() or result.asFieldScope() = n.(FieldValueNode).getField() or result.asCallable() = any(Expr e | n.(AdditionalNode).nodeAt(e, _)).getEnclosingCallable() or - result.asCallable() = n.(SsaNode).getDefinitionExt().getBasicBlock().getEnclosingCallable() + result.asCallable() = n.(SsaNode).getBasicBlock().getEnclosingCallable() } /** Holds if `p` is a `ParameterNode` of `c` with position `pos`. */