mirror of
https://github.com/github/codeql.git
synced 2026-05-01 03:35:13 +02:00
C++: respond to PR comments
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user