AI review of 2026-10-05_08-17-12-a32896bae9cd-results.txt PR: #8918 https://github.com/cppcheck-opensource/cppcheck/pull/8918 Tested: a32896bae9cdbea6635e03d6c411ee440826e4e7 Merge base: 746b3a7c03201ced453ab8ea06c2ce0ae35b140d Reviewed: 2026-10-06 18:13:06 UTC Model: claude-opus-5-5 (effort high) Results: 1 reviewed of 1 in the report Verdicts: 1 regression Tokens: 1340 input, 0 cache read, 1991 cache write, 545 output The verdicts are written by AI and can be wrong. ---- 1 / 1 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/l/lief/lief_0.9.0.orig.tar.gz Result: your LIEF-0.9.0/src/DEX/MapList.cpp:37:41: style: Parameter 'p' can be declared as reference to const [constParameterReference] Explanation: The lambda returns `&(p.second)` as a non-const `MapItem*`. If `p` were a reference to const, `&p.second` would be a `const MapItem*` and the code would not compile. The new warning is therefore a false positive. The old code reached the `.` node after unwrapping the unary `&` and checked lifetime on it, which tracked back to `p`. The new visitor always descends into op2 of `.` (the member `second`) and never checks lifetime on the `.` node itself. It therefore loses the connection to `p`, so the parameter is no longer seen as escaping through the returned pointer.