================ @@ -603,6 +611,8 @@ void ArrayBoundCheckerV2::performCheck(const Expr *E, CheckerContext &C) const { auto [WithinUpperBound, ExceedsUpperBound] = compareValueToThreshold(State, ByteOffset, *KnownSize, SVB); + bool AssumedNonNegative = SUR.assumedNonNegative(); ---------------- balazske wrote:
My first observation was at the text output generation when at the `if` statement `AssumedNonNegative` is true and a message is printed "can be negative or ...", this looks like a bug. Because the same name is used at other places this may clarify the meaning, but a comment would be useful anyway (even if the current name remains). I would not use a variable, instead call `SUR.assumedNonNegative()` directly, then it is better visible that the value comes from `StateUpdateReporter`. https://github.com/llvm/llvm-project/pull/84201 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits