@@ -85,8 +85,8 @@ class AssignableRead extends AssignableAccess {
8585 }
8686
8787 pragma [ noinline]
88- private ControlFlow :: Node getAnAdjacentReadSameVar ( ) {
89- SsaImpl:: adjacentReadPairSameVar ( _, this .getAControlFlowNode ( ) , result )
88+ private ControlFlowNode getAnAdjacentReadSameVar ( ) {
89+ SsaImpl:: adjacentReadPairSameVar ( _, this .getControlFlowNode ( ) , result )
9090 }
9191
9292 /**
@@ -114,11 +114,7 @@ class AssignableRead extends AssignableAccess {
114114 * - The read of `this.Field` on line 11 is next to the read on line 10.
115115 */
116116 pragma [ nomagic]
117- AssignableRead getANextRead ( ) {
118- forex ( ControlFlow:: Node cfn | cfn = result .getAControlFlowNode ( ) |
119- cfn = this .getAnAdjacentReadSameVar ( )
120- )
121- }
117+ AssignableRead getANextRead ( ) { result .getControlFlowNode ( ) = this .getAnAdjacentReadSameVar ( ) }
122118}
123119
124120/**
@@ -410,7 +406,7 @@ private import AssignableInternal
410406 */
411407class AssignableDefinition extends TAssignableDefinition {
412408 /**
413- * DEPRECATED: Use `this.getExpr().getAControlFlowNode ()` instead.
409+ * DEPRECATED: Use `this.getExpr().getControlFlowNode ()` instead.
414410 *
415411 * Gets a control flow node that updates the targeted assignable when
416412 * reached.
@@ -419,9 +415,7 @@ class AssignableDefinition extends TAssignableDefinition {
419415 * the definitions of `x` and `y` in `M(out x, out y)` and `(x, y) = (0, 1)`
420416 * relate to the same call to `M` and assignment node, respectively.
421417 */
422- deprecated ControlFlow:: Node getAControlFlowNode ( ) {
423- result = this .getExpr ( ) .getAControlFlowNode ( )
424- }
418+ deprecated ControlFlowNode getAControlFlowNode ( ) { result = this .getExpr ( ) .getControlFlowNode ( ) }
425419
426420 /**
427421 * Gets the underlying expression that updates the targeted assignable when
@@ -494,7 +488,7 @@ class AssignableDefinition extends TAssignableDefinition {
494488 */
495489 pragma [ nomagic]
496490 AssignableRead getAFirstRead ( ) {
497- forex ( ControlFlow :: Node cfn | cfn = result .getAControlFlowNode ( ) |
491+ exists ( ControlFlowNode cfn | cfn = result .getControlFlowNode ( ) |
498492 exists ( Ssa:: ExplicitDefinition def | result = def .getAFirstReadAtNode ( cfn ) |
499493 this = def .getADefinition ( )
500494 )
@@ -572,11 +566,9 @@ module AssignableDefinitions {
572566 }
573567
574568 /** Holds if a node in basic block `bb` assigns to `ref` parameter `p` via definition `def`. */
575- private predicate basicBlockRefParamDef (
576- ControlFlow:: BasicBlock bb , Parameter p , AssignableDefinition def
577- ) {
569+ private predicate basicBlockRefParamDef ( BasicBlock bb , Parameter p , AssignableDefinition def ) {
578570 def = any ( RefArg arg ) .getAnAnalyzableRefDef ( p ) and
579- bb .getANode ( ) = def .getExpr ( ) .getAControlFlowNode ( )
571+ bb .getANode ( ) = def .getExpr ( ) .getControlFlowNode ( )
580572 }
581573
582574 /**
@@ -585,17 +577,15 @@ module AssignableDefinitions {
585577 * any assignments to `p`.
586578 */
587579 pragma [ nomagic]
588- private predicate parameterReachesWithoutDef ( Parameter p , ControlFlow :: BasicBlock bb ) {
580+ private predicate parameterReachesWithoutDef ( Parameter p , BasicBlock bb ) {
589581 forall ( AssignableDefinition def | basicBlockRefParamDef ( bb , p , def ) |
590582 isUncertainRefCall ( def .getTargetAccess ( ) )
591583 ) and
592584 (
593585 any ( RefArg arg ) .isAnalyzable ( p ) and
594586 p .getCallable ( ) .getEntryPoint ( ) = bb .getFirstNode ( )
595587 or
596- exists ( ControlFlow:: BasicBlock mid | parameterReachesWithoutDef ( p , mid ) |
597- bb = mid .getASuccessor ( )
598- )
588+ exists ( BasicBlock mid | parameterReachesWithoutDef ( p , mid ) | bb = mid .getASuccessor ( ) )
599589 )
600590 }
601591
@@ -607,7 +597,7 @@ module AssignableDefinitions {
607597 cached
608598 predicate isUncertainRefCall ( RefArg arg ) {
609599 arg .isPotentialAssignment ( ) and
610- exists ( ControlFlow :: BasicBlock bb , Parameter p | arg .isAnalyzable ( p ) |
600+ exists ( BasicBlock bb , Parameter p | arg .isAnalyzable ( p ) |
611601 parameterReachesWithoutDef ( p , bb ) and
612602 bb .getLastNode ( ) = p .getCallable ( ) .getExitPoint ( )
613603 )
@@ -688,7 +678,7 @@ module AssignableDefinitions {
688678 /** Gets the underlying parameter. */
689679 Parameter getParameter ( ) { result = p }
690680
691- deprecated override ControlFlow :: Node getAControlFlowNode ( ) {
681+ deprecated override ControlFlowNode getAControlFlowNode ( ) {
692682 result = p .getCallable ( ) .getEntryPoint ( )
693683 }
694684
0 commit comments