C++: respond to PR comments

This commit is contained in:
Robert Marsh
2019-03-07 10:18:25 -08:00
parent 17ad124c9e
commit ef836c39bb
2 changed files with 4 additions and 6 deletions

View File

@@ -177,7 +177,6 @@ private predicate operandEscapesNonReturn(Operand operand) {
operandEscapesDomain(operand)
}
private predicate operandMayReachReturn(Operand operand) {
// The address is propagated to the result of the instruction, and that result itself is returned
operandIsPropagated(operand, _) and
@@ -204,7 +203,7 @@ private predicate operandReturned(Operand operand, IntValue bitOffset) {
exists(IntValue bitOffset1, IntValue bitOffset2 |
operandIsPropagated(operand, bitOffset1) and
resultReturned(operand.getUseInstruction(), bitOffset2) and
bitOffset = bitOffset1 + bitOffset2
bitOffset = Ints::add(bitOffset1, bitOffset2)
)
or
// The operand is used in a function call which returns it, and the return value is then returned
@@ -212,7 +211,7 @@ private predicate operandReturned(Operand operand, IntValue bitOffset) {
isArgumentForParameter(ci, operand, init) and
resultReturned(init, bitOffset1) and
resultReturned(ci, bitOffset2) and
bitOffset = bitOffset1 + bitOffset2
bitOffset = Ints::add(bitOffset1, bitOffset2)
)
or

View File

@@ -177,7 +177,6 @@ private predicate operandEscapesNonReturn(Operand operand) {
operandEscapesDomain(operand)
}
private predicate operandMayReachReturn(Operand operand) {
// The address is propagated to the result of the instruction, and that result itself is returned
operandIsPropagated(operand, _) and
@@ -204,7 +203,7 @@ private predicate operandReturned(Operand operand, IntValue bitOffset) {
exists(IntValue bitOffset1, IntValue bitOffset2 |
operandIsPropagated(operand, bitOffset1) and
resultReturned(operand.getUseInstruction(), bitOffset2) and
bitOffset = bitOffset1 + bitOffset2
bitOffset = Ints::add(bitOffset1, bitOffset2)
)
or
// The operand is used in a function call which returns it, and the return value is then returned
@@ -212,7 +211,7 @@ private predicate operandReturned(Operand operand, IntValue bitOffset) {
isArgumentForParameter(ci, operand, init) and
resultReturned(init, bitOffset1) and
resultReturned(ci, bitOffset2) and
bitOffset = bitOffset1 + bitOffset2
bitOffset = Ints::add(bitOffset1, bitOffset2)
)
or