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 {
405
405
/** An SSA node. */
406
406
class SsaNode extends Node , TSsaNode {
407
407
SsaImpl:: DataFlowIntegration:: SsaNode node ;
408
- SsaImpl:: DefinitionExt def ;
409
408
410
- SsaNode ( ) {
411
- this = TSsaNode ( node ) and
412
- def = node .getDefinitionExt ( )
413
- }
409
+ SsaNode ( ) { this = TSsaNode ( node ) }
414
410
415
- override CfgScope getCfgScope ( ) { result = def .getBasicBlock ( ) .getScope ( ) }
411
+ override CfgScope getCfgScope ( ) { result = node .getBasicBlock ( ) .getScope ( ) }
416
412
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
+ }
418
417
419
418
override Location getLocation ( ) { result = node .getLocation ( ) }
420
419
@@ -634,7 +633,7 @@ module LocalFlow {
634
633
or
635
634
// An edge from a pattern/expression to its corresponding SSA definition.
636
635
nodeFrom .( Node:: AstCfgFlowNode ) .getCfgNode ( ) =
637
- nodeTo .( Node:: SsaNode ) .getDefinitionExt ( ) .( Ssa:: WriteDefinition ) .getControlFlowNode ( )
636
+ nodeTo .( Node:: SsaNode ) .asDefinition ( ) .( Ssa:: WriteDefinition ) .getControlFlowNode ( )
638
637
or
639
638
nodeFrom .( Node:: SourceParameterNode ) .getParameter ( ) .( ParamCfgNode ) .getPat ( ) = nodeTo .asPat ( )
640
639
or
You can’t perform that action at this time.
0 commit comments