AI review of 2026-10-28_08-53-12-45944b9f53bf-results.txt PR: #8967 https://github.com/cppcheck-opensource/cppcheck/pull/8967 Tested: 45944b9f53bf4bbceb1232034a4ed0a2f25e538c Merge base: ffe7e9be207e201c7b8d6ed5272b931889879a14 Reviewed: 2026-10-31 07:44:09 UTC Model: claude-opus-5-5 (effort high) Results: 2 reviewed of 15 in the report, 13 not reviewed: valueFlowMaxIterations Verdicts: 2 regression Tokens: 3304 input, 2929 cache read, 2929 cache write, 412 output The verdicts are written by AI and can be wrong. ---- 1 / 2 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/t/telegram-desktop/telegram-desktop_5.7.2+ds.orig.tar.xz Result: your tdesktop-5.7.2-full/Telegram/SourceFiles/boxes/add_contact_box.cpp:116:6: style: Condition '!success' is always false [knownConditionTrueFalse] Explanation: `success` is built by chaining lambdas with an overloaded `operator|` (base::optional pipe). It is an optional/bool result that can be empty or false at runtime, for example when the updates type is unexpected or the chats list is empty. The PR's new valueflow rule treats every binary `|` with a non-zero lambda operand as an integer bitwise OR and marks the result as impossible 0. It does not check that the operator is overloaded or that the operands are class/lambda types. That is why `!success` is now reported as always false. This is a false positive. ---- 2 / 2 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/t/telegram-desktop/telegram-desktop_5.7.2+ds.orig.tar.xz Result: your tdesktop-5.7.2-full/Telegram/SourceFiles/boxes/add_contact_box.cpp:872:7: style: Condition '!success' is always false [knownConditionTrueFalse] Explanation: Here `|` is an overloaded operator from base/optional that chains lambdas over std::optional (a monadic bind). It is not an integer bitwise OR. `success` is an optional that can be empty, for example when the update type is unexpected or the chat is not a channel, so `!success` can be true. The new valueflow rule marks any binary `|` as impossible-0 when one operand looks non-null. It does not check that the operands are integral or that the operator is the builtin one. Here the non-null operand is `make_optional(&result)` or a lambda. The resulting warning is a false positive.