File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
rust/ql/lib/codeql/rust/dataflow/internal Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments