{ "tokens": { "input": 30134, "cache_read": 26433, "cache_write": 8811, "output": 9128 }, "reviews": [ { "key": [ "https://ftp.debian.org/debian/pool/main/p/plf-colony/plf-colony_7.17.orig.tar.xz", "main plf_colony.h:3476:12: error: Using 'memcpy' on class that contains a 'std::allocator_traits'. [memsetClass]" ], "verdict": { "verdict": "neutral", "confidence": "medium", "explanation": "The memcpy at line 3476 runs only inside an `if constexpr` that checks `is_trivially_copyable` / `is_trivial` for the allocator and pointer types. The class members are typedefs like `std::allocator_traits<...>::pointer` and `::size_type`, which are normally raw pointers and `size_t`. So the memsetClass warning is a false positive both before and after the PR. The PR changes how the type name is built: it now uses `getTypeName()`, giving `std::allocator_traits::pointer` and `std::allocator_traits::size_type` instead of `std::allocator_traits`. This removed line is therefore not a fixed false positive. It is replaced by two equally wrong warnings with different text, so the change does not help users here." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/p/plf-colony/plf-colony_7.17.orig.tar.xz", "main plf_colony.h:4223:10: error: Using 'memcpy' on class that contains a 'std::allocator_traits'. [memsetClass]" ], "verdict": { "verdict": "regression", "confidence": "low", "explanation": "The memcpy in `swap()` is only reached when the pointer types are trivial (`if constexpr` guard). The members are `allocator_traits<...>::pointer` and `size_type` typedefs, which are raw pointers and integers. So memsetClass is a false positive both before and after the PR. The PR swaps the token-built type name `std::allocator_traits` for `getTypeName()`, which gives `std::allocator_traits::pointer` and `std::allocator_traits::size_type`. The names are more specific, but they are still not recognized as POD types. As a result, the single false positive removed here is replaced by two false positives at the same location. Users see more noise, not less." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/p/plf-colony/plf-colony_7.17.orig.tar.xz", "main plf_colony.h:4224:10: error: Using 'memcpy' on class that contains a 'std::allocator_traits'. [memsetClass]" ], "verdict": { "verdict": "neutral", "confidence": "medium", "explanation": "The `swap()` code copies `colony` with `memcpy` only inside a constexpr branch. That branch requires `is_always_equal` and `std::is_trivial` for all the allocator-derived pointer types, so the memcpy is safe. The memsetClass warning is therefore a false positive both before and after the PR. The PR now computes the type name with `getTypeName()`. As a result, this single `'std::allocator_traits'` warning is replaced by two warnings at the same line, naming `'std::allocator_traits::pointer'` and `'std::allocator_traits::size_type'`. The names are slightly more precise, but the same false positive remains and is now duplicated. On balance this changes nothing meaningful for users." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/p/plf-colony/plf-colony_7.17.orig.tar.xz", "main plf_colony.h:4225:10: error: Using 'memcpy' on class that contains a 'std::allocator_traits'. [memsetClass]" ], "verdict": { "verdict": "neutral", "confidence": "low", "explanation": "In `swap()`, the memcpy of `colony` only runs when `is_trivial` checks on the pointer types pass. Its members are `allocator_traits<...>::pointer` and `size_type`, which are normally raw pointers and integers, so the memsetClass warning is a false positive both before and after the PR. The PR replaces the hand-built type name, which stopped at `std::allocator_traits`, with `getTypeName()`. That turns the single 'std::allocator_traits' message into two messages naming '::pointer' and '::size_type'. The names are slightly more precise, but the warning is still wrong and now appears twice. This removed line is just the old text of a warning that is still reported, so users see no real gain or loss here." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/p/plf-colony/plf-colony_7.17.orig.tar.xz", "your plf_colony.h:3476:12: error: Using 'memcpy' on class that contains a 'std::allocator_traits::pointer'. [memsetClass]" ], "verdict": { "verdict": "regression", "confidence": "medium", "explanation": "The memcpy at line 3476 only runs under `if constexpr`, after checking that the allocator is trivially copyable (or always equal) and that the pointer types are trivial. The members in question are `std::allocator_traits<...>::pointer` and `::size_type`, which are normally raw pointers and size_t. Those are POD, so the memsetClass warning is a false positive both before and after the PR. The PR now builds the type name with `getTypeName()`, which produces the full nested name. That name is not recognized as a POD `std::` type and is not `std::array`, so the single old false positive becomes two (`::pointer` and `::size_type`). The new name points even more clearly at trivially copyable types, which makes the error claim more obviously wrong. This adds false-positive noise." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/p/plf-colony/plf-colony_7.17.orig.tar.xz", "your plf_colony.h:3476:12: error: Using 'memcpy' on class that contains a 'std::allocator_traits::size_type'. [memsetClass]" ], "verdict": { "verdict": "regression", "confidence": "medium", "explanation": "The PR now builds the type name with getTypeName(), which keeps nested names. So `std::allocator_traits<...>::size_type` is no longer cut down to `std::allocator_traits`. The colony members of type `size_type` are therefore reported separately from the `pointer` members. `size_type` is an unsigned integer type, and copying it with memcpy is harmless. The memcpy is also inside an `if constexpr` that already requires trivially copyable allocators and trivial pointer types. This new line is an extra false positive about a plainly trivial integer member." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/p/plf-colony/plf-colony_7.17.orig.tar.xz", "your plf_colony.h:4223:10: error: Using 'memcpy' on class that contains a 'std::allocator_traits::pointer'. [memsetClass]" ], "verdict": { "verdict": "regression", "confidence": "medium", "explanation": "This `memcpy` in `swap()` only runs when the allocator is always-equal and every pointer type is trivial. The members it copies are typedefs of `std::allocator_traits<...>::pointer` and `size_type`, so copying them with `memcpy` is fine and the memsetClass warning is a false positive. Main already reported this false positive once per line. The PR now builds the type name with `getTypeName()`, so the false positive splits into two separate warnings per line ('...::pointer' and '...::size_type'). That adds false-positive noise without improving correctness." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/p/plf-colony/plf-colony_7.17.orig.tar.xz", "your plf_colony.h:4223:10: error: Using 'memcpy' on class that contains a 'std::allocator_traits::size_type'. [memsetClass]" ], "verdict": { "verdict": "regression", "confidence": "medium", "explanation": "The `colony` class has members declared as `std::allocator_traits<...>::size_type` and `::pointer`. Main built the type name only up to the template, so it reported a single memsetClass warning naming 'std::allocator_traits'. The PR uses `getTypeName()`, which now gives 'std::allocator_traits::size_type' and '...::pointer', so the one warning becomes two. `size_type` is an unsigned integer type (normally `std::size_t`), which is trivially copyable. Using `memcpy` on a class containing it is harmless. The code also guards the `memcpy` path with `is_always_equal` and `is_trivial` checks. This reported line is therefore a false positive, and it adds a second false positive at each location instead of fixing the existing one." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/p/plf-colony/plf-colony_7.17.orig.tar.xz", "your plf_colony.h:4224:10: error: Using 'memcpy' on class that contains a 'std::allocator_traits::pointer'. [memsetClass]" ], "verdict": { "verdict": "neutral", "confidence": "low", "explanation": "This line is mostly a rewording of an existing warning. Main already reported memsetClass at this memcpy, naming 'std::allocator_traits'. The PR now uses Variable::getTypeName(), so it names the full typedef 'std::allocator_traits::pointer' (and adds a separate 'size_type' line). The underlying warning is still a false positive. allocator_traits<...>::pointer is a raw pointer for normal allocators, and the memcpy swap is guarded by is_always_equal and is_trivial checks on the pointer types. Renaming a false positive does not really help users, though the extra size_type line adds some noise." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/p/plf-colony/plf-colony_7.17.orig.tar.xz", "your plf_colony.h:4224:10: error: Using 'memcpy' on class that contains a 'std::allocator_traits::size_type'. [memsetClass]" ], "verdict": { "verdict": "regression", "confidence": "medium", "explanation": "The PR now uses `var.getTypeName()` in `checkMemsetType`, which keeps template-member names such as `std::allocator_traits::size_type` instead of truncating them to `std::allocator_traits`. Members whose names used to collapse into one warning are now reported separately. This line is the extra warning. `std::allocator_traits::size_type` is an unsigned integer type, typically `size_t`. Copying it with `memcpy` is harmless. The code also only takes the `memcpy` path when the allocator is always-equal and the pointer types are trivial. So this new warning is a false positive and adds noise without finding a real problem." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/p/plf-colony/plf-colony_7.17.orig.tar.xz", "your plf_colony.h:4225:10: error: Using 'memcpy' on class that contains a 'std::allocator_traits::pointer'. [memsetClass]" ], "verdict": { "verdict": "regression", "confidence": "medium", "explanation": "The memcpy in `swap()` only runs when all pointer types are trivial and the allocator is always equal. The members it reports, `std::allocator_traits<...>::pointer` and `size_type`, are typically raw pointers and `size_t`, so the warning is a false positive in both versions. The PR replaced the manual type-name build (which stopped at `std::allocator_traits`) with `getTypeName()`. That produces distinct names, so each memcpy now gets two false-positive warnings instead of one. The more specific wording does not fix the underlying false positive." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/p/plf-colony/plf-colony_7.17.orig.tar.xz", "your plf_colony.h:4225:10: error: Using 'memcpy' on class that contains a 'std::allocator_traits::size_type'. [memsetClass]" ], "verdict": { "verdict": "regression", "confidence": "medium", "explanation": "The `swap()` code memcpy's a `colony` only when the pointer types are trivial. The members typed `std::allocator_traits<...>::size_type` and `::pointer` are typedefs for trivial types such as `size_t` and raw pointers, so the memsetClass warning is a false positive. Main reported one such warning per line. Because the PR now uses `getTypeName()` for the full nested name, it splits this into two warnings per line. This new line is an additional false positive, not a newly found real issue." } } ], "started": "2026-10-20 16:02:54 UTC", "runner": "pc" }