Skip to content

Commit 9e05569

Browse files
committed
C++/C#: Sync identical files.
1 parent 57cc316 commit 9e05569

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/IRBlock.qll

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,9 @@ private module Cached {
271271
/** Holds if `i` is the `index`th instruction in `block`. */
272272
cached
273273
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
276277
index = getMemberIndex(result) and
277278
BlockAdjacency::getEquivalenceClass(first) = BlockAdjacency::getEquivalenceClass(result)
278279
)

cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/IRBlock.qll

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,9 @@ private module Cached {
271271
/** Holds if `i` is the `index`th instruction in `block`. */
272272
cached
273273
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
276277
index = getMemberIndex(result) and
277278
BlockAdjacency::getEquivalenceClass(first) = BlockAdjacency::getEquivalenceClass(result)
278279
)

csharp/ql/src/experimental/ir/implementation/raw/IRBlock.qll

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,9 @@ private module Cached {
271271
/** Holds if `i` is the `index`th instruction in `block`. */
272272
cached
273273
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
276277
index = getMemberIndex(result) and
277278
BlockAdjacency::getEquivalenceClass(first) = BlockAdjacency::getEquivalenceClass(result)
278279
)

csharp/ql/src/experimental/ir/implementation/unaliased_ssa/IRBlock.qll

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,9 @@ private module Cached {
271271
/** Holds if `i` is the `index`th instruction in `block`. */
272272
cached
273273
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
276277
index = getMemberIndex(result) and
277278
BlockAdjacency::getEquivalenceClass(first) = BlockAdjacency::getEquivalenceClass(result)
278279
)

0 commit comments

Comments
 (0)