File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
cpp/ql/lib/semmle/code/cpp/ir/implementation Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -338,10 +338,9 @@ private predicate resultEscapesNonReturn(Instruction instr) {
338
338
not instr .isResultModeled ( )
339
339
}
340
340
341
- /** Holds if `operand` may (transitively) flow to an `AddressOperand` whose use is unmodeled . */
341
+ /** Holds if `operand` may (transitively) flow to an `AddressOperand`. */
342
342
private predicate consumedAsAddressOperand ( Operand operand ) {
343
- operand instanceof AddressOperand and
344
- exists ( Instruction use | not use .isResultModeled ( ) )
343
+ operand instanceof AddressOperand
345
344
or
346
345
exists ( Operand address |
347
346
consumedAsAddressOperand ( address ) and
@@ -351,7 +350,7 @@ private predicate consumedAsAddressOperand(Operand operand) {
351
350
352
351
/**
353
352
* Holds if `operand` may originate from a base instruction of an allocation,
354
- * and that operand may transitively flow to an `AddressOperand` whose use is unmodeled .
353
+ * and that operand may transitively flow to an `AddressOperand`.
355
354
*/
356
355
private predicate propagatedFromAllocationBase ( Operand operand , Configuration:: Allocation allocation ) {
357
356
consumedAsAddressOperand ( operand ) and
Original file line number Diff line number Diff line change @@ -340,8 +340,7 @@ private predicate resultEscapesNonReturn(Instruction instr) {
340
340
341
341
/** Holds if `operand` may (transitively) flow to an `AddressOperand` whose use is unmodeled. */
342
342
private predicate consumedAsAddressOperand ( Operand operand ) {
343
- operand instanceof AddressOperand and
344
- exists ( Instruction use | not use .isResultModeled ( ) )
343
+ exists ( Instruction use | use = operand .( AddressOperand ) .getUse ( ) and not use .isResultModeled ( ) )
345
344
or
346
345
exists ( Operand address |
347
346
consumedAsAddressOperand ( address ) and
You can’t perform that action at this time.
0 commit comments