AI review of 2026-12-02_09-10-26-d2794ed7a598-results.txt PR: #9094 https://github.com/cppcheck-opensource/cppcheck/pull/9094 Tested: d2794ed7a5984d88f796286b8c5017708db45fe3 Merge base: 6a4fedd30039c61578c8ba1bc482fecaed6b8a39 Reviewed: 2026-12-03 23:18:56 UTC Model: claude-opus-5-5 (effort high) Results: 2 reviewed of 2 in the report, the test is still running (900 analysed of 1000 requested packages) Verdicts: 2 regression Tokens: 3274 input, 0 cache read, 5056 cache write, 959 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/c/cbmc/cbmc_6.6.0.orig.tar.gz Result: your cbmc-cbmc-6.6.0/unit/catch/catch.hpp:13377:35: error: Using reference to dangling temporary. [danglingTempReference] cbmc-cbmc-6.6.0/unit/catch/catch.hpp:13376:25: note: Assigned to reference. cbmc-cbmc-6.6.0/unit/catch/catch.hpp:13377:35: note: Using reference to dangling temporary. Explanation: In Catch2, `getAllTestCasesSorted()` returns `std::vector const&`, a reference to the registry's persistent storage. `const_cast&>(...)` only strips const from that reference, so `tests` binds to a long-lived object, not a temporary. Iterating it on the next line is safe. The PR changed how `isTemporary` handles casts, and C++ casts like `const_cast` are now treated differently. As a result, the reference-cast result is now wrongly classified as a temporary. This is a new false positive. ---- 2 / 2 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/k/kylin-ai-vector-engine/kylin-ai-vector-engine_1.2.0.2.orig.tar.gz Result: your kylin-ai-vector-engine-1.2.0.2/thirdparty/simdjson/dependencies/jsoncppdist/json/json.h:1445:61: error: Reference to temporary returned. [returnTempReference] Explanation: `reference` is a typedef for `Value&`, so `const_cast(deref())` is a reference cast of the lvalue returned by `deref()`. It does not create a temporary, so returning it is fine. The new `isTemporary` logic treats any cast as temporary unless its valueType is marked as a reference. Here the typedef'd reference type is apparently not resolved to a reference, so Cppcheck wrongly treats the cast as a temporary. This is a new false positive.