C++: Add another convenience predicate on 'BinaryInstruction'.

This commit is contained in:
Mathias Vorreiter Pedersen
2025-09-17 16:10:39 +01:00
parent 19b8e0db9c
commit 70a8364a38

View File

@@ -1084,6 +1084,12 @@ class BinaryInstruction extends Instruction {
or
op1 = this.getRightOperand() and op2 = this.getLeftOperand()
}
/**
* Gets the instruction whose result provides the value of the left or right
* operand of this binary instruction.
*/
Instruction getAnInput() { result = this.getLeft() or result = this.getRight() }
}
/**