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> {
89
89
BasicBlock getAPredecessor ( SuccessorType t ) { result .getASuccessor ( t ) = this }
90
90
91
91
/** 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 ) }
93
93
94
94
/** Gets a control flow node in this basic block. */
95
95
Node getANode ( ) { result = this .getNode ( _) }
@@ -308,10 +308,12 @@ module Make<LocationSig Location, InputSig<Location> Input> {
308
308
* Holds if `bbStart` is the first node in a basic block and `cfn` is the
309
309
* `i`th node in the same basic block.
310
310
*/
311
- cached
312
- predicate bbIndex ( Node bbStart , Node cfn , int i ) =
311
+ private predicate bbIndex ( Node bbStart , Node cfn , int i ) =
313
312
shortestDistances( startsBB / 1 , intraBBSucc / 2 ) ( bbStart , cfn , i )
314
313
314
+ cached
315
+ Node getNode ( BasicBlock bb , int pos ) { bbIndex ( bb .getFirstNode ( ) , result , pos ) }
316
+
315
317
/**
316
318
* Holds if the first node of basic block `succ` is a control flow
317
319
* successor of the last node of basic block `pred`.
You can’t perform that action at this time.
0 commit comments