File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
shared/controlflow/codeql/controlflow Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ module Make<LocationSig Location, InputSig<Location> Input> {
8989 BasicBlock getAPredecessor ( SuccessorType t ) { result .getASuccessor ( t ) = this }
9090
9191 /** Gets the control flow node at a specific (zero-indexed) position in this basic block. */
92- Node getNode ( int pos ) { bbIndex ( this . getFirstNode ( ) , result , pos ) }
92+ Node getNode ( int pos ) { result = getNode ( this , pos ) }
9393
9494 /** Gets a control flow node in this basic block. */
9595 Node getANode ( ) { result = this .getNode ( _) }
@@ -308,10 +308,12 @@ module Make<LocationSig Location, InputSig<Location> Input> {
308308 * Holds if `bbStart` is the first node in a basic block and `cfn` is the
309309 * `i`th node in the same basic block.
310310 */
311- cached
312- predicate bbIndex ( Node bbStart , Node cfn , int i ) =
311+ private predicate bbIndex ( Node bbStart , Node cfn , int i ) =
313312 shortestDistances( startsBB / 1 , intraBBSucc / 2 ) ( bbStart , cfn , i )
314313
314+ cached
315+ Node getNode ( BasicBlock bb , int pos ) { bbIndex ( bb .getFirstNode ( ) , result , pos ) }
316+
315317 /**
316318 * Holds if the first node of basic block `succ` is a control flow
317319 * successor of the last node of basic block `pred`.
You can’t perform that action at this time.
0 commit comments