AI review of 2026-10-26_14-53-58-2f62d59bd3d5-results.txt PR: #8965 https://github.com/cppcheck-opensource/cppcheck/pull/8965 Tested: 2f62d59bd3d5ff2c558b686cc84161da109d755b Merge base: 1516cd2c2dc4b5a44b63576637cd53bc423dcaf1 Reviewed: 2026-10-27 13:27:35 UTC Model: claude-opus-5-5 (effort high) Results: 6 reviewed of 6 in the report, the test is still running (600 analysed of 1000 requested packages) Verdicts: 2 improvement, 4 regression Tokens: 11371 input, 8540 cache read, 4270 cache write, 3564 output The verdicts are written by AI and can be wrong. ---- 1 / 6 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/d/denemo/denemo_2.6.49.orig.tar.xz Result: your denemo-2.6.49/src/ui/mousing.c:1429:88: style: Condition '((DenemoStaff*)gui->movement->currentstaff->data)->staff_directives,1' is always true [knownConditionTrueFalse] Explanation: Line 1429 is `if (expr->staff_directives, 1)`. The comma operator throws away the left operand, so the condition is always the literal 1, which is always true. Before the PR, the comma's parent `(` followed `if`, which matches `%name% (`, so it was wrongly treated as a function call and no value was passed up. The PR excludes control-flow keywords, so the known value 1 now reaches the condition. The warning is accurate. The developer probably wrote this on purpose as a hack to always take the branch, but flagging a dead condition like this is exactly what the style check is for, so this is a true positive. ---- 2 / 6 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/d/denemo/denemo_2.6.49.orig.tar.xz Result: your denemo-2.6.49/src/ui/mousing.c:1438:89: style: Condition '((DenemoStaff*)gui->movement->currentstaff->data)->voice_directives,1' is always true [knownConditionTrueFalse] Explanation: The condition `(((DenemoStaff*)...)->voice_directives, 1)` uses the comma operator, so its value is always 1 and the condition is always true. Before the PR, the `(` of `if` was mistaken for a function call because the token before it, `if`, matches `%name%`. That stopped the comma's value from being propagated. The PR excludes control-flow keywords, so Cppcheck now correctly sees the known value. The developer probably wrote `, 1` on purpose to force the branch, but the warning is accurate and points at dead or odd code. It is a true positive. ---- 3 / 6 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/r/r-base/r-base_4.6.1.orig.tar.xz Result: your R-4.6.1/src/extra/tre/tre-match-approx.c:331:30: style: Condition '(void)1,1' is always true [knownConditionTrueFalse] Explanation: `while (/*CONSTCOND*/(void)1,1)` is a deliberate infinite-loop idiom; the `(void)1,` part exists only to quiet lint tools. Before the PR, the `(` after `while` matched `%name% (` and was treated as a function call, so the comma expression got no value. The PR excludes control-flow keywords, so the comma now gets the known value 1. Cppcheck then reports 'always true'. Cppcheck normally does not warn about intentional constant loop conditions such as `while (1)` or `while (true)`. This condition is built only from literals and is clearly intentional, so the new warning is noise rather than a useful finding. That makes it a false positive. ---- 4 / 6 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/r/r-base/r-base_4.6.1.orig.tar.xz Result: your R-4.6.1/src/extra/tre/tre-match-backtrack.c:375:30: style: Condition '(void)1,1' is always true [knownConditionTrueFalse] Explanation: `while (/*CONSTCOND*/(void)1,1)` is a deliberate infinite-loop idiom; the `/*CONSTCOND*/` comment tells lint tools the constant condition is intentional. Before the PR, the `(` after `while` matched `%name% (` and was treated as a function call, so the comma got no value. The new `isControlFlowKeyword` check removes that exclusion. The comma expression now gets the known value 1. Cppcheck normally does not report constant loop conditions like `while (1)` because they are intentional. The comma form slips past that suppression. The warning is technically true, but it is pure noise that users cannot act on. It is a new false-positive-like style warning, repeated across the tre sources. ---- 5 / 6 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/r/r-base/r-base_4.6.1.orig.tar.xz Result: your R-4.6.1/src/extra/tre/tre-match-parallel.c:272:30: style: Condition '(void)1,1' is always true [knownConditionTrueFalse] Explanation: Line 272 is `while (/*CONSTCOND*/(void)1,1)`, a deliberate infinite-loop idiom; the CONSTCOND comment marks the constant condition as intentional, and the comma form exists to silence compiler/lint warnings. Before the PR, the `(` of `while` was mistaken for a function call (the old check matched `%name% (` with `while` as the name), so the comma got no value. The PR excludes control-flow keywords, so the comma now gets the known value 1. The warning is technically correct. But Cppcheck normally does not report constant-literal loop conditions such as `while (1)`, and this condition is just as intentional. The four new warnings in this package are all this same TRE idiom, so they are noise for users rather than real findings. ---- 6 / 6 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/r/r-base/r-base_4.6.1.orig.tar.xz Result: your R-4.6.1/src/extra/tre/tre-parse.c:1234:32: style: Condition '(void)1,1' is always true [knownConditionTrueFalse] Explanation: `while (/*CONSTCOND*/(void)1,1)` is a deliberate infinite-loop idiom; the `/*CONSTCOND*/` comment marks the constant as intentional for lint tools. The PR now treats the `while (` parenthesis as a non-call, so the comma expression gets a known value and is reported. Cppcheck normally does not report literal constant loop conditions such as `while(1)`, and this is the same thing written in a lint-friendly form. The condition is technically always true, but the new warning has no value to the user. It is noise, effectively a false positive, across four TRE files.