C++: Respond to review comments.

This commit is contained in:
Mathias Vorreiter Pedersen
2024-07-18 17:04:52 +01:00
parent 7b8301ac7a
commit a5efe9fa09
2 changed files with 4 additions and 6 deletions

View File

@@ -338,10 +338,9 @@ private predicate resultEscapesNonReturn(Instruction instr) {
not instr.isResultModeled()
}
/** Holds if `operand` may (transitively) flow to an `AddressOperand` whose use is unmodeled. */
/** Holds if `operand` may (transitively) flow to an `AddressOperand`. */
private predicate consumedAsAddressOperand(Operand operand) {
operand instanceof AddressOperand and
exists(Instruction use | not use.isResultModeled())
operand instanceof AddressOperand
or
exists(Operand address |
consumedAsAddressOperand(address) and
@@ -351,7 +350,7 @@ private predicate consumedAsAddressOperand(Operand operand) {
/**
* Holds if `operand` may originate from a base instruction of an allocation,
* and that operand may transitively flow to an `AddressOperand` whose use is unmodeled.
* and that operand may transitively flow to an `AddressOperand`.
*/
private predicate propagatedFromAllocationBase(Operand operand, Configuration::Allocation allocation) {
consumedAsAddressOperand(operand) and

View File

@@ -340,8 +340,7 @@ private predicate resultEscapesNonReturn(Instruction instr) {
/** Holds if `operand` may (transitively) flow to an `AddressOperand` whose use is unmodeled. */
private predicate consumedAsAddressOperand(Operand operand) {
operand instanceof AddressOperand and
exists(Instruction use | not use.isResultModeled())
exists(Instruction use | use = operand.(AddressOperand).getUse() and not use.isResultModeled())
or
exists(Operand address |
consumedAsAddressOperand(address) and