From 0ed07310243f6f8ebb66786915c5108b56724f73 Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Wed, 10 Apr 2024 15:04:29 +0100 Subject: [PATCH] C++: Reduce comment duplication. --- .../semmle/code/cpp/models/implementations/Iterator.qll | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/cpp/ql/lib/semmle/code/cpp/models/implementations/Iterator.qll b/cpp/ql/lib/semmle/code/cpp/models/implementations/Iterator.qll index 0144b97d2bff..8e527c7e6947 100644 --- a/cpp/ql/lib/semmle/code/cpp/models/implementations/Iterator.qll +++ b/cpp/ql/lib/semmle/code/cpp/models/implementations/Iterator.qll @@ -141,12 +141,8 @@ private class IteratorCrementNonMemberOperatorModel extends IteratorCrementNonMe } override predicate hasSpecificWriteSideEffect(ParameterIndex i, boolean buffer, boolean mustWrite) { - // We have two choices here: either `buffer` must be `true` or `mustWrite` - // must be `false` to ensure that the IR alias analysis doesn't think that - // `it++` completely override the value of the iterator. - // We choose `mustWrite` must be `false`. In that case, the value of - // `buffer` isn't super important (it just decides which kind of read side - // effect will be emitted). + // See the comment on `IteratorCrementMemberOperatorModel::hasSpecificWriteSideEffect` + // for an explanation of these values. i = 0 and buffer = false and mustWrite = false }