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

Skip to content

Commit 0a6f914

Browse files
committed
C++: Make the documentation on 'isSink' less ambiguous.
1 parent 0aed890 commit 0a6f914

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,11 @@ private module Cached {
515515

516516
private predicate isSink(Instruction instr, CallInstruction call) {
517517
getAUse(instr).(ArgumentOperand).getCall() = call and
518-
// Don't include various operations that don't modify what the iterator points to.
518+
// Only include operations that may modify the object that the iterator points to.
519+
// The following is a non-exhaustive list of things that may modify the value of the
520+
// iterator, but never the value of what the iterator points to.
521+
// The more things we can exclude here, the faster the small dataflow-like analysis
522+
// done by `convertsIntoArgument` will converge.
519523
not exists(Function f | f = call.getStaticCallTarget() |
520524
f instanceof Iterator::IteratorCrementOperator or
521525
f instanceof Iterator::IteratorBinaryArithmeticOperator or

0 commit comments

Comments
 (0)