Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 981c976

Browse files
committed
C++: Expand comments.
1 parent 6b851d0 commit 981c976

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,6 @@ predicate operandForFullyConvertedCall(Operand operand, CallInstruction call) {
439439
private predicate instructionForFullyConvertedCallWithConversions(
440440
Instruction instr, CallInstruction call
441441
) {
442-
// Otherwise, flow to the first non-conversion use.
443442
instr =
444443
getUse(unique(Operand operand |
445444
operand = fullyConvertedCallStep*(getAUse(call)) and
@@ -455,12 +454,14 @@ private predicate instructionForFullyConvertedCallWithConversions(
455454
* conversion instruction) to use to represent the value of `call` after conversions.
456455
*/
457456
predicate instructionForFullyConvertedCall(Instruction instr, CallInstruction call) {
457+
// Only pick an instruction for the call if we cannot pick a unique operand.
458458
not operandForFullyConvertedCall(_, call) and
459459
(
460460
// If there is no use of the call then we pick the call instruction
461461
not instructionForFullyConvertedCallWithConversions(_, call) and
462462
instr = call
463463
or
464+
// Otherwise, flow to the first instruction that defines multiple operands.
464465
instructionForFullyConvertedCallWithConversions(instr, call)
465466
)
466467
}

0 commit comments

Comments
 (0)