File tree Expand file tree Collapse file tree 4 files changed +12
-8
lines changed
cpp/ql/lib/semmle/code/cpp/ir/implementation
csharp/ql/src/experimental/ir/implementation Expand file tree Collapse file tree 4 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -271,8 +271,9 @@ private module Cached {
271
271
/** Holds if `i` is the `index`th instruction in `block`. */
272
272
cached
273
273
Instruction getInstruction ( TIRBlock block , int index ) {
274
- exists ( Instruction first |
275
- block = MkIRBlock ( first ) and
274
+ exists ( Instruction first | block = MkIRBlock ( first ) |
275
+ first = result and index = 0
276
+ or
276
277
index = getMemberIndex ( result ) and
277
278
BlockAdjacency:: getEquivalenceClass ( first ) = BlockAdjacency:: getEquivalenceClass ( result )
278
279
)
Original file line number Diff line number Diff line change @@ -271,8 +271,9 @@ private module Cached {
271
271
/** Holds if `i` is the `index`th instruction in `block`. */
272
272
cached
273
273
Instruction getInstruction ( TIRBlock block , int index ) {
274
- exists ( Instruction first |
275
- block = MkIRBlock ( first ) and
274
+ exists ( Instruction first | block = MkIRBlock ( first ) |
275
+ first = result and index = 0
276
+ or
276
277
index = getMemberIndex ( result ) and
277
278
BlockAdjacency:: getEquivalenceClass ( first ) = BlockAdjacency:: getEquivalenceClass ( result )
278
279
)
Original file line number Diff line number Diff line change @@ -271,8 +271,9 @@ private module Cached {
271
271
/** Holds if `i` is the `index`th instruction in `block`. */
272
272
cached
273
273
Instruction getInstruction ( TIRBlock block , int index ) {
274
- exists ( Instruction first |
275
- block = MkIRBlock ( first ) and
274
+ exists ( Instruction first | block = MkIRBlock ( first ) |
275
+ first = result and index = 0
276
+ or
276
277
index = getMemberIndex ( result ) and
277
278
BlockAdjacency:: getEquivalenceClass ( first ) = BlockAdjacency:: getEquivalenceClass ( result )
278
279
)
Original file line number Diff line number Diff line change @@ -271,8 +271,9 @@ private module Cached {
271
271
/** Holds if `i` is the `index`th instruction in `block`. */
272
272
cached
273
273
Instruction getInstruction ( TIRBlock block , int index ) {
274
- exists ( Instruction first |
275
- block = MkIRBlock ( first ) and
274
+ exists ( Instruction first | block = MkIRBlock ( first ) |
275
+ first = result and index = 0
276
+ or
276
277
index = getMemberIndex ( result ) and
277
278
BlockAdjacency:: getEquivalenceClass ( first ) = BlockAdjacency:: getEquivalenceClass ( result )
278
279
)
You can’t perform that action at this time.
0 commit comments