Skip to content

Commit 0ed0731

Browse files
committed
C++: Reduce comment duplication.
1 parent 9c9ed13 commit 0ed0731

File tree

1 file changed

+2
-6
lines changed
  • cpp/ql/lib/semmle/code/cpp/models/implementations

1 file changed

+2
-6
lines changed

cpp/ql/lib/semmle/code/cpp/models/implementations/Iterator.qll

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,8 @@ private class IteratorCrementNonMemberOperatorModel extends IteratorCrementNonMe
141141
}
142142

143143
override predicate hasSpecificWriteSideEffect(ParameterIndex i, boolean buffer, boolean mustWrite) {
144-
// We have two choices here: either `buffer` must be `true` or `mustWrite`
145-
// must be `false` to ensure that the IR alias analysis doesn't think that
146-
// `it++` completely override the value of the iterator.
147-
// We choose `mustWrite` must be `false`. In that case, the value of
148-
// `buffer` isn't super important (it just decides which kind of read side
149-
// effect will be emitted).
144+
// See the comment on `IteratorCrementMemberOperatorModel::hasSpecificWriteSideEffect`
145+
// for an explanation of these values.
150146
i = 0 and buffer = false and mustWrite = false
151147
}
152148

0 commit comments

Comments
 (0)