Skip to content

Commit f0f4311

Browse files
committed
C++: Sync identical files.
1 parent 70a8364 commit f0f4311

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,6 +1084,12 @@ class BinaryInstruction extends Instruction {
10841084
or
10851085
op1 = this.getRightOperand() and op2 = this.getLeftOperand()
10861086
}
1087+
1088+
/**
1089+
* Gets the instruction whose result provides the value of the left or right
1090+
* operand of this binary instruction.
1091+
*/
1092+
Instruction getAnInput() { result = this.getLeft() or result = this.getRight() }
10871093
}
10881094

10891095
/**

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,6 +1084,12 @@ class BinaryInstruction extends Instruction {
10841084
or
10851085
op1 = this.getRightOperand() and op2 = this.getLeftOperand()
10861086
}
1087+
1088+
/**
1089+
* Gets the instruction whose result provides the value of the left or right
1090+
* operand of this binary instruction.
1091+
*/
1092+
Instruction getAnInput() { result = this.getLeft() or result = this.getRight() }
10871093
}
10881094

10891095
/**

0 commit comments

Comments
 (0)