mirror of
https://github.com/github/codeql.git
synced 2026-03-20 22:46:47 +01:00
C++: Add 'getReturnAddress' and 'getReturnAddressOperand' predicates to 'ReturnValueInstruction'.
This commit is contained in:
@@ -753,11 +753,21 @@ class ReturnValueInstruction extends ReturnInstruction {
|
||||
*/
|
||||
final LoadOperand getReturnValueOperand() { result = getAnOperand() }
|
||||
|
||||
/**
|
||||
* Gets the operand that provides the address of the value being returned by the function.
|
||||
*/
|
||||
final AddressOperand getReturnAddressOperand() { result = this.getAnOperand() }
|
||||
|
||||
/**
|
||||
* Gets the instruction whose result provides the value being returned by the function, if an
|
||||
* exact definition is available.
|
||||
*/
|
||||
final Instruction getReturnValue() { result = getReturnValueOperand().getDef() }
|
||||
final Instruction getReturnValue() { result = this.getReturnValueOperand().getDef() }
|
||||
|
||||
/**
|
||||
* Gets the instruction whose result provides the address of the value being returned by the function.
|
||||
*/
|
||||
final Instruction getReturnAddress() { result = this.getReturnAddressOperand().getDef() }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user