Skip to content

Commit 7499df4

Browse files
committed
Rust: Remove getDefinitionExt reference.
1 parent 0583d85 commit 7499df4

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

rust/ql/lib/codeql/rust/dataflow/internal/DataFlowImpl.qll

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -405,16 +405,15 @@ module Node {
405405
/** An SSA node. */
406406
class SsaNode extends Node, TSsaNode {
407407
SsaImpl::DataFlowIntegration::SsaNode node;
408-
SsaImpl::DefinitionExt def;
409408

410-
SsaNode() {
411-
this = TSsaNode(node) and
412-
def = node.getDefinitionExt()
413-
}
409+
SsaNode() { this = TSsaNode(node) }
414410

415-
override CfgScope getCfgScope() { result = def.getBasicBlock().getScope() }
411+
override CfgScope getCfgScope() { result = node.getBasicBlock().getScope() }
416412

417-
SsaImpl::DefinitionExt getDefinitionExt() { result = def }
413+
/** Gets the definition this node corresponds to, if any. */
414+
SsaImpl::Definition asDefinition() {
415+
result = node.(SsaImpl::DataFlowIntegration::SsaDefinitionNode).getDefinition()
416+
}
418417

419418
override Location getLocation() { result = node.getLocation() }
420419

@@ -634,7 +633,7 @@ module LocalFlow {
634633
or
635634
// An edge from a pattern/expression to its corresponding SSA definition.
636635
nodeFrom.(Node::AstCfgFlowNode).getCfgNode() =
637-
nodeTo.(Node::SsaNode).getDefinitionExt().(Ssa::WriteDefinition).getControlFlowNode()
636+
nodeTo.(Node::SsaNode).asDefinition().(Ssa::WriteDefinition).getControlFlowNode()
638637
or
639638
nodeFrom.(Node::SourceParameterNode).getParameter().(ParamCfgNode).getPat() = nodeTo.asPat()
640639
or

0 commit comments

Comments
 (0)