AI review of 2026-10-16_22-48-35-7ef5b9367249-results.txt PR: #8720 https://github.com/cppcheck-opensource/cppcheck/pull/8720 Tested: 7ef5b93672494e885d72ec67fef930549c8fbb7e Merge base: 99ad2a83ab14c29d753272388b916887d936af03 Reviewed: 2026-10-18 18:40:11 UTC Model: claude-opus-5-5 (effort high) Results: 50 reviewed of 119 in the report (random sample) Verdicts: 13 improvement, 3 neutral, 32 regression, 2 unclear Tokens: 96913 input, 3104080 cache read, 776020 cache write, 39280 output The verdicts are written by AI and can be wrong. ---- 1 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/a/aegisub/aegisub_3.5.0~beta.orig.tar.xz Result: main Aegisub-3.5.0/src/audio_renderer_spectrum.cpp:171:29: style:inconclusive: Technically the member function 'AudioSpectrumRenderer::ConvertToFloat' can be const. [functionConst] Aegisub-3.5.0/src/audio_renderer_spectrum.h:115:7: note: Technically the member function 'AudioSpectrumRenderer::ConvertToFloat' can be const. Aegisub-3.5.0/src/audio_renderer_spectrum.cpp:171:29: note: Technically the member function 'AudioSpectrumRenderer::ConvertToFloat' can be const. Explanation: `ConvertToFloat` is a template member that only reads the member `audio_scratch` and writes through the `dest` parameter, so it really could be const. Both versions report this true positive at the same location. The only difference is the name in the message. Main analysed the uninstantiated template and said 'ConvertToFloat'. With the PR the call is now deduced and instantiated, so the message says 'ConvertToFloat < float >'. The finding is the same and the location and fix are unchanged. The name is slightly less natural but still identifies the function, so this does not matter to users. ---- 2 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/a/aegisub/aegisub_3.5.0~beta.orig.tar.xz Result: your Aegisub-3.5.0/src/colour_button.h:29:1: debug: SymbolDatabase couldn't resolve all user defined types. [debug] Explanation: Line 29 declares `class ColourButton: public wxButton`. wxButton comes from an external wx header, so Cppcheck could not resolve it before the PR either. Main did not print this debug message; the PR does. The PR makes the symbol database be rebuilt or incrementally updated after template type deduction, and moves some phases into finalize(). That appears to leave base type information unresolved, or to emit the unresolved-type check again, in this header. Nothing in this class or this code changed in a way that would justify a new debug message. A new debug message about unresolved types means the symbol database is in a worse or noisier state, so this is a regression. ---- 3 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/a/aegisub/aegisub_3.5.0~beta.orig.tar.xz Result: your Aegisub-3.5.0/src/text_file_writer.h:27:1: debug: SymbolDatabase couldn't resolve all user defined types. [debug] Explanation: This new debug message comes from the need-initialization pass, which the PR moves into `finalize()` so it runs after the type-deduction rebuild or incremental update. `TextFileWriter` has an `agi::io::Save` member and a `unique_ptr` member, and this exact code was resolved without the message on main. The PR also adds the same message for several other unrelated classes in this package. Together that points to the reordered or rebuilt symbol database losing type information (type pointers or `needInitialization` state), not to anything in this code. A new debug message showing Cppcheck understands the code worse is a regression. ---- 4 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/a/aegisub/aegisub_3.5.0~beta.orig.tar.xz Result: your Aegisub-3.5.0/src/validators.h:83:1: debug: SymbolDatabase couldn't resolve all user defined types. [debug] Explanation: Line 83 is the declaration of the class template `EnumBinder`, which is used through `MakeEnumBinder(T*)`. The source code did not change. Only the PR adds the debug message "SymbolDatabase couldn't resolve all user defined types" here, and it adds the same message in three other headers of this package. The PR's new type-deduction pass instantiates templates, removes declarations and updates or rebuilds the symbol database. That process apparently leaves some type tokens unresolved that main resolved. A new debug message of this kind means Cppcheck now understands the code less well, so this is a regression. ---- 5 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/a/aegisub/aegisub_3.5.0~beta.orig.tar.xz Result: your Aegisub-3.5.0/src/value_event.h:23:1: debug: SymbolDatabase couldn't resolve all user defined types. [debug] Explanation: The PR adds a new debug message 'SymbolDatabase couldn't resolve all user defined types' at the class template ValueEvent, which inherits from wxEvent. Main did not report this. The likely cause is the PR's restructuring: createSymbolDatabaseIncompleteVars is moved into finalize(), and the symbol database is incrementally updated or fully rebuilt after type-deduction rounds. Some type pointers for this template (or its instantiation) are left unresolved. The code is unchanged and simple, so the new debug message shows Cppcheck understands the code worse after the change. It is a debug-only effect but still a regression. ---- 6 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/a/arpack++/arpack++_2.3.orig.tar.gz Result: main arpack++-2.3/examples/product/complex/compshf.cc:64:65: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable T [valueFlowBailoutIncompleteVar] Explanation: `Test(T type)` is only called as `Test((float)0.0)` and `Test((double)0.0)`. These cast arguments are not literals, so main could not deduce T. The template body was left uninstantiated, and ValueFlow bailed out on the unknown name `T` at line 64. The PR deduces T from the argument types and creates `Test` and `Test`, then removes the generic template. The body is now analysed with concrete types, so the bailout correctly disappears because Cppcheck understands the code better. ---- 7 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/b/bornagain/bornagain_24.1+ds3.orig.tar.xz Result: main bornagain-24.1/3rdparty/common/gtest/googletest-1.17.0/googletest/test/googletest-printers-test.cc:1244:8: style: struct member 'iterator::x' is never used. [unusedStructMember] Explanation: `struct iterator { char x; };` exists only to be passed to the function template `Print(it)`. The test expects `Print` to dump the object's bytes ("1-byte object <00>"), so the member's storage is read even though `x` is never named. With the PR, `Print(it)` is deduced to `Print(it)`, so the struct now appears as a template argument. The unusedStructMember check bails out for structs used as template arguments, because generic code can use the members in ways the check cannot see. That is exactly the case here, so dropping this warning on a deliberate test fixture is reasonable and makes it a likely false positive removed. ---- 8 / 50 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/b/bornagain/bornagain_24.1+ds3.orig.tar.xz Result: your bornagain-24.1/3rdparty/common/gtest/googletest-1.17.0/googletest/src/gtest-printers.cc:268:34: style: Condition '1<=c' is always true [knownConditionTrueFalse] bornagain-24.1/3rdparty/common/gtest/googletest-1.17.0/googletest/src/gtest-printers.cc:262:9: note: Assuming that condition 'c==0' is not redundant bornagain-24.1/3rdparty/common/gtest/googletest-1.17.0/googletest/src/gtest-printers.cc:268:34: note: Condition '1<=c' is always true Explanation: `PrintCharAndCodeTo` is a template that is instantiated for `unsigned char`, `signed char` and `wchar_t`. The PR now deduces these instantiations. In the `unsigned char` instance, `c == 0` returning early does make `1 <= c` always true. In the `signed char` instance, though, `c` can be negative, so `1 <= c` is a real test there. The warning points at shared template source, and acting on it by removing the check would break the signed instantiations. This is a new false positive for users. ---- 9 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/c/clickhouse/clickhouse_18.16.1+ds.orig.tar.xz Result: main ClickHouse-18.16.1-stable/libs/consistent-hashing/consistent_hashing.cpp:72:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable TValue [valueFlowBailoutIncompleteVar] Explanation: `GetAsteriskBits` is a function template called as `GetAsteriskBits(a, b, c, d, k)` from inside `ConsistentHashingImpl`, with no explicit template arguments. Before the PR, Cppcheck could not deduce `TValue` from non-literal arguments, so the template stayed uninstantiated. ValueFlow then bailed out on the raw template body because `TValue` was an incomplete name. The PR deduces `TValue` from the argument ValueTypes. Inside the explicitly instantiated `ConsistentHashingImpl`, `a`, `b`, `c` and `d` all have the same concrete type, so `GetAsteriskBits` is instantiated and the template declaration is removed. The bailout disappears because the function body is now analyzed with a concrete type, which is a real gain in understanding of the code. ---- 10 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/c/clickhouse/clickhouse_18.16.1+ds.orig.tar.xz Result: your ClickHouse-18.16.1-stable/dbms/src/Common/Config/ConfigReloader.h:26:1: debug: SymbolDatabase couldn't resolve all user defined types. [debug] Explanation: The PR adds a new debug message, 'SymbolDatabase couldn't resolve all user defined types', at the ordinary class ConfigReloader. Main did not report it for the same code. The PR changes how the symbol database is built: some phases move to finalize(), there is an incremental add/remove of symbols after template deduction, and declaration removal can be deferred. The most likely cause is that the rebuilt or updated database now leaves some type pointers unresolved in this translation unit. A new debug message means Cppcheck understands the code worse, so this counts as a regression. ---- 11 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/d/devil/devil_1.8.0.40.g6f3d5e9b+dfsg.orig.tar.xz Result: main devil-v1.8.0.40.g6f3d5e9b/DevIL/src-IL/src/rg_etc1.cpp:748:58: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable T [valueFlowBailoutIncompleteVar] Explanation: Line 748 is in the uninstantiated function template `indirect_radix_sort`. On main, ValueFlow skipped the whole function because `T` in `sizeof(T)` was an unknown, incomplete name. The PR deduces template arguments from the argument types of calls. This function's parameters (`T*`, `const Q*` and concrete types) are all forms the PR supports. So a call that passes pointer arguments can now be instantiated with concrete types, and the generic template body is removed. The bailout most likely disappears because Cppcheck now analyzes a concrete instantiation instead of skipping the function. The call site is not shown, so this cannot be fully confirmed. ---- 12 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/h/hsail-tools/hsail-tools_0~20180830.orig.tar.xz Result: your hsail-tools-0~20180830/libHSAIL/HSAILDisassembler.h:276:18: style: The member function 'HSAIL_ASM::Disassembler::value2str < unsigned long >' can be static. [functionStatic] hsail-tools-0~20180830/libHSAIL/HSAILDisassembler.h:276:18: note: The member function 'HSAIL_ASM::Disassembler::value2str < unsigned long >' can be static. hsail-tools-0~20180830/libHSAIL/HSAILDisassembler.h:276:18: note: The member function 'HSAIL_ASM::Disassembler::value2str < unsigned long >' can be static. Explanation: `value2str` is a member function template whose body never touches `this` or any member. It only uses its parameter and local stringstreams, so it really could be static. Before the PR, Cppcheck did not instantiate it because the calls pass variables, not literals. With the new type deduction it now instantiates `value2str` and the functionStatic check correctly finds no member access. The warning is a true positive. The only drawback is that the same line is reported once per instantiation (`unsigned int`, `unsigned long`), which is a bit redundant but not wrong. ---- 13 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/i/intel-compute-runtime-legacy/intel-compute-runtime-legacy_24.35.30872.45.orig.tar.gz Result: main intel-compute-runtime-6c940d1/shared/test/unit_test/program/printf_helper_tests.cpp:96:86: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable T [valueFlowBailoutIncompleteVar] Explanation: The removed line is a debug bailout from main. Main skipped the uninstantiated `storeData` template because of the incomplete variable T. With the PR, calls like `storeData(dataType)` and `storeData(value)` can now have T deduced from the argument's ValueType. The template gets instantiated, so the uninstantiated declaration with T is no longer analyzed. Cppcheck now understands the code better and the bailout message disappears. ---- 14 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/i/intel-compute-runtime-legacy/intel-compute-runtime-legacy_24.35.30872.45.orig.tar.gz Result: your intel-compute-runtime-6c940d1/shared/source/program/print_formatter.h:71:27: portability: Casting between const unsigned char * and const double * which have an incompatible binary data representation. [invalidPointerCast] Explanation: With the PR, the call `read(&value)` inside `typedPrintToken` / `typedPrintVectorToken` is deduced as `read`, and the body is now actually instantiated. Previously main bailed out on the incomplete variable T. After instantiation, line 71 is `reinterpret_cast(printfOutputBuffer + currentOffset)` with `printfOutputBuffer` being `const uint8_t *`. That cast from a byte pointer to a `double` pointer is exactly what invalidPointerCast reports. The same code written without a template would get the same warning. The deduction (T = double from `double value`) is correct. The cast plus the `*srcPtr` dereference reinterprets raw bytes as `double`, which is the type-punning or aliasing issue this portability check targets. This is a newly found finding by the check's design, not a misdeduction, so it counts as an improvement. ---- 15 / 50 ---- Verdict: REGRESSION (low confidence) Package: https://ftp.debian.org/debian/pool/main/i/intel-compute-runtime-legacy/intel-compute-runtime-legacy_24.35.30872.45.orig.tar.gz Result: your intel-compute-runtime-6c940d1/shared/source/program/print_formatter.h:71:27: portability: Casting between const unsigned char * and const float * which have an incompatible binary data representation. [invalidPointerCast] Explanation: The PR now deduces `T=float` for `read(&value)` inside `typedPrintToken`, so `read` is instantiated. That instantiation casts `const uint8_t *` (`printfOutputBuffer + currentOffset`) to `const float *`. This is ordinary deserialization of a raw byte buffer that actually holds float values written by the kernel, and the code checks alignment before dereferencing (falling back to `memcpy_s`). The warning text about an 'incompatible binary data representation' does not fit here: the bytes are meant to be read as floats. The type deduction is correct, but the new invalidPointerCast report on this byte-buffer read pattern is practically a false positive. It is noise for users rather than a real portability problem. ---- 16 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/i/intel-compute-runtime-legacy/intel-compute-runtime-legacy_24.35.30872.45.orig.tar.gz Result: your intel-compute-runtime-6c940d1/third_party/gtest/src/gtest-printers.cc:268:34: style: Condition '1<=c' is always true [knownConditionTrueFalse] intel-compute-runtime-6c940d1/third_party/gtest/src/gtest-printers.cc:262:9: note: Assuming that condition 'c==0' is not redundant intel-compute-runtime-6c940d1/third_party/gtest/src/gtest-printers.cc:268:34: note: Condition '1<=c' is always true Explanation: PrintCharAndCodeTo is a generic template. It is instantiated with unsigned char, signed char and wchar_t. With the new deduction, Cppcheck creates the unsigned char instantiation. There, after `if (c == 0) return;`, the check `1 <= c` is always true. However, the condition comes from the template source and is needed for the signed char and wchar_t instantiations, where c can be negative. Reporting it as always true is misleading for the generic code. It is effectively a false positive caused by analysing one deduced instantiation without accounting for the template argument origin of the type (the PR added such a guard only for the unsigned-positive check). ---- 17 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/k/kleopatra/kleopatra_26.08.2.orig.tar.xz Result: your kleopatra-26.08.2/src/commands/adduseridcommand.cpp:33:1: debug: SymbolDatabase couldn't resolve all user defined types. [debug] Explanation: This new debug message appears only with the PR. It shows up at a class definition (`AddUserIDCommand::Private : public Command::Private`) whose base class and member types resolved fine before. The PR adds type-deduction rounds that update or rebuild the symbol database. It also moves several database phases into `finalize()`. One of these changes evidently leaves some user-defined types (likely the base class or member types) unresolved. Neither the source nor the PR suggests the code itself is problematic. The same pattern appears in several similar Kleopatra files. A new debug message like this means Cppcheck understands the code worse than before. ---- 18 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/k/kleopatra/kleopatra_26.08.2.orig.tar.xz Result: your kleopatra-26.08.2/src/commands/changepassphrasecommand.cpp:31:1: debug: SymbolDatabase couldn't resolve all user defined types. [debug] Explanation: The PR adds a new debug message, 'SymbolDatabase couldn't resolve all user defined types', at the class definition `ChangePassphraseCommand::Private : public Command::Private`. Main did not report it for the same code. This class is not even a template. The likely cause is the new type-deduction pass, which rebuilds or incrementally updates the symbol database; afterwards a user-defined type in this file is no longer resolved, possibly the base class `Command::Private`. The same new debug line appears in several similar command files. A new debug message like this means Cppcheck now understands the code worse. ---- 19 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/k/kleopatra/kleopatra_26.08.2.orig.tar.xz Result: your kleopatra-26.08.2/src/commands/revokeuseridcommand.cpp:31:1: debug: SymbolDatabase couldn't resolve all user defined types. [debug] Explanation: The PR adds a new debug message at the declaration of `RevokeUserIDCommand::Private`, which derives from `Command::Private`. The message says the symbol database could not resolve the base class or other user defined types. Main does not report this for the same code, so the cause is the PR's new type-deduction rounds: the symbol database is now rebuilt or incrementally updated after template simplification. The same message also appears in several sibling command files with the same pattern. This means Cppcheck now understands the class hierarchy worse here, not better. ---- 20 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/k/kleopatra/kleopatra_26.08.2.orig.tar.xz Result: your kleopatra-26.08.2/src/dialogs/certifywidget.cpp:131:1: debug: SymbolDatabase couldn't resolve all user defined types. [debug] Explanation: The PR adds a new 'SymbolDatabase couldn't resolve all user defined types' debug message at the plain struct `UserIDCheckState`. Nothing about this struct changed. The same new message shows up in 7 kleopatra files, which points to a systematic cause. The likely cause is the new template deduction rounds and the incremental symbol database update (`removeSymbolsForTokens` / `addSymbolsForNewTokenRanges`), which seem to leave some type references unresolved that main resolved. A new debug message of this kind means Cppcheck understands the code worse. ---- 21 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/k/kmail/kmail_26.08.2.orig.tar.xz Result: your kmail-26.08.2/src/job/addemailtoexistingcontactjob.h:12:1: debug: SymbolDatabase couldn't resolve all user defined types. [debug] Explanation: The PR adds a new debug message, "SymbolDatabase couldn't resolve all user defined types", on a plain class that derives from KJob and has members of the external types QString and Akonadi::Item. There is no template code here that type deduction would touch. The message most likely appears because the PR moved createSymbolDatabaseIncompleteVars and related phases into finalize(), or because the symbol database is now rebuilt or updated incrementally after template deduction rounds, which changes how the debug check runs. Since main did not report it, this new debug output reflects the symbol database handling the code worse (or at least noisier), not any real gain in understanding. ---- 22 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/k/kmail/kmail_26.08.2.orig.tar.xz Result: your kmail-26.08.2/src/kmcommands.h:444:1: debug: SymbolDatabase couldn't resolve all user defined types. [debug] Explanation: This debug message comes from the needInitialization pass, which the PR moves into the new SymbolDatabase::finalize(). That pass now runs after the extra template type-deduction rounds, which update the symbol database incrementally or rebuild it. KMPrintCommand at line 444 is an ordinary class with a member of the struct type KMPrintCommandInfo declared just above it, and main resolved its initialization state without complaint. With the PR, Cppcheck now reports that it could not resolve all user-defined types here, and at several other class definitions in the same header. The source did not change, so this is a new bailout caused by the reordered or updated symbol database: Cppcheck understands the class types worse than before. ---- 23 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/liba/libassa/libassa_3.5.1.orig.tar.gz Result: main libassa-3.5.1/tests/echoxdr_testc.cpp:361:9: style: Variable 'b' is assigned a value that is never used. [unreadVariable] Explanation: Line 361 is `bool b = true, br;`, and `b` is never read afterwards, so the unreadVariable warning is a true positive both before and after the PR. Only the column changed. Main reports column 9, which is the `=` of the initialization; the PR reports column 7, which is the name `b`. The message, line and variable are the same, and either location identifies the problem clearly. The shift probably comes from the warning now being reported through a different code path, likely because the template calls in this function (`dump_var`, `compare_and_report`) are now deduced. It does not affect users. ---- 24 / 50 ---- Verdict: NEUTRAL (low confidence) Package: https://ftp.debian.org/debian/pool/main/liba/libassa/libassa_3.5.1.orig.tar.gz Result: your libassa-3.5.1/tests/echoxdr_testc.cpp:361:7: style: Variable 'b' is assigned a value that is never used. [unreadVariable] Explanation: The same unreadVariable warning for `b` on line 361 is reported in both runs; only the column changed. Main points at the `=` token (column 9), the PR points at the variable name `b` (column 7). The shift probably means a different reporting path in the unused-variable check fired after the PR's template and AST changes. The shown code does not reveal whether `b` is used later, so the correctness of the warning cannot be judged here. For users this is effectively the same diagnostic at a slightly different column. ---- 25 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/m/mednafen/mednafen_1.32.1+dfsg.orig.tar.xz Result: main mednafen/src/ss/vdp2_render.cpp:1880:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Xsp [valueFlowBailoutIncompleteVar] Explanation: `SetupRotVars` is a function template taking `const T* rs`. In main it was never instantiated, because it is called without explicit template arguments and with a non-literal argument. So ValueFlow analysed the generic body, where `rs[i].Xsp` has unknown type, and bailed out on the incomplete variable `Xsp`. The PR adds type deduction from argument expressions and supports the `const T*` parameter form. The call is most likely now instantiated with the concrete struct type, so the members are known and the bailout disappears. That means the function body is actually analysed now. ---- 26 / 50 ---- Verdict: REGRESSION (low confidence) Package: https://ftp.debian.org/debian/pool/main/m/mednafen/mednafen_1.32.1+dfsg.orig.tar.xz Result: your mednafen/src/string/string.cpp:1021:9: debug: Failed to instantiate template "ProcessUTF8". The checking continues anyway. [templateInstantiation] Explanation: `ValidateUTF8` calls `ProcessUTF8(s, slen, permit, utf_noreplace, dummy_cp_handler)`. `ProcessUTF8` evidently has additional template parameters (the handler types, cf. the lambda call at line 1033), so only `T` is given explicitly and the rest would have to be deduced. The PR's new deduction from variable arguments most likely now instantiates `ValidateUTF8` at its call site, which exposes this inner call. The simplifier cannot instantiate a call with partially explicit arguments plus deduced handler types, so it emits a new `templateInstantiation` debug message. The PR itself adds a similar selfcheck suppression for this case. Cppcheck may now reach more code, but the visible result for users is a new failure/bailout message about code it still cannot handle. ---- 27 / 50 ---- Verdict: UNCLEAR (low confidence) Package: https://ftp.debian.org/debian/pool/main/m/meshlab/meshlab_2025.07~dfsg.orig.tar.xz Result: main meshlab-dc48b91ae562756a6988048c5d5c7f1d2b687256/src/meshlabplugins/filter_texture/filter_texture.cpp:370:15: warning: Invalid log() argument nr 1. The value is -1 but the valid values are '4.94066e-324:'. [invalidFunctionArg] meshlab-dc48b91ae562756a6988048c5d5c7f1d2b687256/src/meshlabplugins/filter_texture/filter_texture.cpp:492:22: note: Assignment 'maxArea=-1', assigned value is -1 meshlab-dc48b91ae562756a6988048c5d5c7f1d2b687256/src/meshlabplugins/filter_texture/filter_texture.cpp:495:20: note: Assuming condition is false meshlab-dc48b91ae562756a6988048c5d5c7f1d2b687256/src/meshlabplugins/filter_texture/filter_texture.cpp:516:38: note: Calling function 'log_2', 1st argument 'maxArea' value is -1 meshlab-dc48b91ae562756a6988048c5d5c7f1d2b687256/src/meshlabplugins/filter_texture/filter_texture.cpp:370:15: note: Invalid argument Explanation: The removed warning says log() inside the template log_2() gets -1. The trace is: `maxArea = -1` at line 492, a condition at line 495 assumed false, then `log_2(maxArea)` at line 516. The code at lines 490–516 is not shown, so the condition at 495 cannot be identified. If it is a loop over the mesh faces that updates maxArea, the warning only applies to an empty mesh and is probably a false positive. If it is a real branch, -1 could actually reach log() and the warning is correct. With this PR, log_2 is now instantiated as a concrete function through type deduction. ValueFlow should still pass -1 into the instantiated body. The warning's disappearance therefore may come from the new incremental symbol database or valueflow handling, not from better understanding of the code. That would make it a lost true positive. Without the code around line 495, it cannot be decided whether this is a removed false positive or a lost true positive. ---- 28 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/m/meshlab/meshlab_2025.07~dfsg.orig.tar.xz Result: your meshlab-dc48b91ae562756a6988048c5d5c7f1d2b687256/src/vcglib/wrap/openfbx/src/ofbx.cpp:1711:33: portability:inconclusive: Casting from double * to unsigned char * is not portable due to different binary data representations on different platforms. [invalidPointerCast] Explanation: The PR now deduces T=double for calls like parseArrayRaw(property, double_ptr, ...) and instantiates the template, which exposes this cast to the invalidPointerCast check. At line 1711 the code casts the output buffer `out` to `u8*` (unsigned char*) so that `decompress` can write raw bytes into it. Accessing an object through an unsigned char pointer is the standard way to do byte-wise access. It is well-defined, and the uncompressed branch does the same thing with memcpy. Any endianness concern comes from the FBX format, not from this cast. The new inconclusive portability warning on a byte-level cast in generic code is noise and not a real defect, so it is effectively a new false positive. ---- 29 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/m/meshlab/meshlab_2025.07~dfsg.orig.tar.xz Result: your meshlab-dc48b91ae562756a6988048c5d5c7f1d2b687256/src/vcglib/wrap/openfbx/src/ofbx.cpp:1711:33: portability:inconclusive: Casting from float * to unsigned char * is not portable due to different binary data representations on different platforms. [invalidPointerCast] Explanation: The PR's new type deduction now instantiates `parseArrayRaw`, so the template body is checked for the first time. Line 1711 casts `T* out` to `u8*` (unsigned char*) to hand a raw byte buffer to `decompress()`. Accessing any object through an unsigned char pointer is well-defined in C++, and this is the normal way to fill a typed buffer from serialized bytes. The cast itself is not a portability problem. The new inconclusive invalidPointerCast warning is therefore noise and effectively a false positive. Even though the deduction that exposed it is probably correct, the added warning is a regression for users. ---- 30 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/n/numpy/numpy_2.4.6+ds.orig.tar.xz Result: main numpy-2.4.6/numpy/_core/src/highway/hwy/base_test.cc:471:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable T [valueFlowBailoutIncompleteVar] Explanation: Line 471 is in the uninstantiated function template `TestEndianGetIntegerVal`. Main never instantiated it, because it is only called with deduced arguments such as `TestEndianGetIntegerVal(int8_t{0x01})`. ValueFlow therefore skipped the template body, where `T` is an incomplete variable. The PR deduces template arguments from the argument types, so the calls get concrete instantiations and the generic template is removed. The bailout disappears because Cppcheck now analyzes concrete code. One caveat: `int8_t` is likely deduced as plain `char` rather than `signed char`, which matters little for the analysis. ---- 31 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/pymol/pymol_3.1.0+dfsg.orig.tar.xz Result: your pymol-open-source-3.1.0/layer2/CoordSet.h:42:1: debug: SymbolDatabase couldn't resolve all user defined types. [debug] Explanation: With the PR, Cppcheck newly emits the debug message 'SymbolDatabase couldn't resolve all user defined types' for struct CoordSet, which derives from CObjectState declared in an included header. Main did not report this, so after the PR's template-deduction rounds and incremental symbol database updates some type, most likely the base class, is no longer resolved. The other new diffs in this package point the same way: line 67 now gets both 'd_U is always false' and 'd_U is always true', which is contradictory. That suggests the incremental update leaves the symbol information inconsistent. A new debug message showing worse code understanding is a regression. ---- 32 / 50 ---- Verdict: REGRESSION (low confidence) Package: https://ftp.debian.org/debian/pool/main/r/rapidcheck/rapidcheck_0~1048-a5724ea.orig.tar.xz Result: your src/detail/DefaultTestListener.cpp:14:65: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable args [valueFlowBailoutIncompleteVar] Explanation: Line 14 is the body of the variadic function template makeListener. There `args` is a function parameter pack, so it is a known variable and not an incomplete one. Main did not report it. With the PR, Cppcheck now flags `args` as an incomplete variable and skips the function in valueFlowConditionExpressions. The PR's type deduction does not apply here: variadic templates are rejected, and every call already has explicit template arguments. The new bailout is therefore probably a side effect of the PR moving createSymbolDatabaseIncompleteVars into finalize(), or of its other symbol database and token type changes. A new debug bailout on correct code means Cppcheck understands this function worse, so this is a regression. The exact cause cannot be confirmed from the information given. ---- 33 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/r/rate4site/rate4site_3.0.0.orig.tar.gz Result: your rate4site-3.0.0/src/phylogeny/likeDist.cpp:182:69: performance: Function parameter 'f' should be passed by const reference. [passedByValue] Explanation: `myNRmethod` is a generic Newton-Raphson helper that takes the callables `f` and `df` as deduced template parameters. Its calls (with functor arguments like `C_evalLikeDist`) were not deduced before. With this PR the call is now deduced and instantiated with a functor type, so passedByValue fires on the template parameter `regF f`. Passing function objects by value is the standard idiom (as in the STL algorithms). These functors are small objects holding references and pointers, so copying them is cheap. Changing the parameter to `const regF&` would also break callables with a non-const `operator()`. Reporting this at the generic template line is noise, so it is most likely a false positive introduced by the new deduction. ---- 34 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/r/rocalution/rocalution_7.2.4.orig.tar.gz Result: your rocALUTION-rocm-7.2.4/clients/benchmarks/rocalution_bench_itsolver_impl.hpp:43:1: debug: SymbolDatabase couldn't resolve all user defined types. [debug] Explanation: Only the PR build reports this debug message, at the template struct `rocalution_bench_itsolver_impl`, which derives from `rocalution_bench_itsolver`. The same message also appears newly at many template driver/trait declarations in this package. The source did not change, so this comes from the PR's new type-deduction rounds: either the incremental symbol database update or the full rebuild after template simplification. After that step Cppcheck can no longer resolve some user-defined types (base classes or aliases) that main resolved. A new debug message of this kind means Cppcheck understands the code worse. ---- 35 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/r/rocalution/rocalution_7.2.4.orig.tar.gz Result: your rocALUTION-rocm-7.2.4/clients/benchmarks/rocalution_driver_itsolver_gmres.hpp:28:1: debug: SymbolDatabase couldn't resolve all user defined types. [debug] Explanation: Line 28 is a partial specialization of the class template `rocalution_driver_itsolver` on the enum value `rocalution_enum_itsolver::gmres`. The PR adds a type-information deduction pass that rebuilds or incrementally updates the symbol database after new template instantiations. After that pass the debug message 'SymbolDatabase couldn't resolve all user defined types' now appears here and in several other class template specializations in this package. Main did not report it, so the new rebuild/update path leaves user-defined types unresolved that were resolved before. A new debug message of this kind means Cppcheck understands the code worse. ---- 36 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/r/rocalution/rocalution_7.2.4.orig.tar.gz Result: your rocALUTION-rocm-7.2.4/clients/benchmarks/rocalution_driver_itsolver_traits.hpp:56:1: debug: SymbolDatabase couldn't resolve all user defined types. [debug] Explanation: The PR adds a new debug message, 'SymbolDatabase couldn't resolve all user defined types', on a partial specialization of a class template. This shows up across many files in this package. It comes from the new type-deduction rounds, which rebuild or incrementally update the symbol database after more template expansion. In this state some user-defined types (the specialized traits structs, LocalMatrix, etc.) are left unresolved. The source code itself is unchanged and valid, so a new debug/bailout message means Cppcheck now understands this code worse. ---- 37 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/r/rocalution/rocalution_7.2.4.orig.tar.gz Result: your rocALUTION-rocm-7.2.4/clients/benchmarks/rocalution_driver_itsolver_traits.hpp:91:1: debug: SymbolDatabase couldn't resolve all user defined types. [debug] Explanation: Line 91 is a partial specialization of a class template (rocalution_driver_itsolver_traits) that only defines type aliases. The PR changes nothing in this code. The new debug message 'SymbolDatabase couldn't resolve all user defined types' appears together with many similar new messages across the benchmark headers. Most likely the new type-deduction round triggered a rebuild, or a changed handling of these specializations, and the symbol database now resolves fewer types than before. A new debug or bailout message on unchanged code means Cppcheck now understands this code worse. ---- 38 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/r/rocm-compilersupport/rocm-compilersupport_6.0+git20231212.4510c28+dfsg.orig.tar.xz Result: your rocm-compilersupport-6.0+git20231212.4510c28+dfsg/lib/comgr/src/comgr.h:65:1: debug: SymbolDatabase couldn't resolve all user defined types. [debug] Explanation: The PR adds a new debug message, 'SymbolDatabase couldn't resolve all user defined types', on struct TargetIdentifier. The struct itself is unchanged and simple: StringRef members plus an llvm::SmallVector member. Main did not report this on the same code, so the new message comes from the PR's changes to how the symbol database is built. Likely causes are the new deduction rounds that update or rebuild the database, or SymbolDatabase phases being moved to finalize(). Either way, Cppcheck now resolves less of this code than before. ---- 39 / 50 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/r/rust-cxx/rust-cxx_1.0.202.orig.tar.gz Result: your cxx-1.0.202/include/cxx.h:1083:3: style: Unused private function: 'layout::do_align_of < const std :: uint8_t >' [unusedPrivateFunction] cxx-1.0.202/include/cxx.h:1083:3: note: Unused private function: 'layout::do_align_of < const std :: uint8_t >' cxx-1.0.202/include/cxx.h:1083:3: note: Unused private function: 'layout::do_align_of < const std :: uint8_t >' Explanation: The PR adds a new unusedPrivateFunction warning for 'layout::do_align_of'. This is a false positive: the private static template do_align_of() is called by layout::align_of() (line 1090). That function is in turn called by the friend free function align_of() (line 1101). The instantiated do_align_of is reached through align_of, so it is used. Main only had a similar false positive for the uninstantiated 'layout::align_of'. The PR now also flags the helper instantiation, and the same package shows a new 'pass count limit hit' debug message. Both point to worse template handling. ---- 40 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/r/rust-cxx/rust-cxx_1.0.202.orig.tar.gz Result: your cxx-1.0.202/include/cxx.h:31:1: debug: TemplateSimplifier: pass count limit hit before simplifications were finished. [debug] Explanation: The new 'TemplateSimplifier: pass count limit hit before simplifications were finished' debug message is reported only with the PR. It appears when the template simplifier is re-run during the new type-information deduction rounds. The simplifier keeps changing the token list for all 10 passes without converging, so simplification is left unfinished. The same file now also gets suspicious new eraseDereference errors and differently named unusedPrivateFunction warnings, which suggests the extra rounds left the code in a worse-understood state. A new bailout/limit message is a regression. ---- 41 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/s/sdrpp/sdrpp_0.0~git20260705.8c9f5ee+dfsg.orig.tar.xz Result: main sdrpp-0.0~git20260705.8c9f5ee/misc_modules/discord_integration/discord-rpc/src/serialization.cpp:70:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable T [valueFlowBailoutIncompleteVar] Explanation: `WriteOptionalString` takes `T& k` and is called with string literals such as `WriteOptionalString(writer, "state", ...)`. For a reference parameter C++ deduces `T = const char[6]`, so `sizeof(T) - 1` is the key length. The new deduction only checks `variable()` dimensions in `isUndecayedArray` and does not recognise a string literal as an array. It takes the literal's `ValueType` (`const char *`) and instantiates `WriteOptionalString`. The same applies to `WriteKey` at line 34. The bailout disappears only because the template is now instantiated with the wrong type. `sizeof(T)` becomes pointer size instead of array size, and literals of different lengths collapse into one instantiation. That can mislead later analysis, so this is not better understanding of the code. ---- 42 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/s/spring/spring_106.0+dfsg.orig.tar.xz Result: main spring-106.0/rts/Sim/Misc/ResourceMapAnalyzer.cpp:504:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable T [valueFlowBailoutIncompleteVar] Explanation: `writeToFile` is a function template (`const T&`, `FILE*`) called with variable arguments: `numSpotsFound`, `averageIncome` and `vectoredSpots[i]`. Before the PR, Cppcheck could only deduce template arguments from literals, so the template stayed uninstantiated. ValueFlow then hit the unknown `T` in `sizeof(T)` and emitted a bailout debug message. With the PR's deduction from the argument types, the calls are instantiated and the generic template is removed. The bailout disappears because Cppcheck now analyzes concrete instantiations, which means it understands the code better. ---- 43 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/s/spring/spring_106.0+dfsg.orig.tar.xz Result: your spring-106.0/rts/System/creg/TypeDeduction.h:246:35: style: Parameter 'var' can be declared as reference to const [constParameterReference] Explanation: With this PR, Cppcheck now deduces the template argument for calls like `GetType(member)`. As a result it instantiates and checks `GetType(X& var)`. In that function the parameter `var` is never used: it only exists for type deduction, and the body just returns `DeduceType::Get()`. So `const T&` would work for every instantiation. It would also still deduce the same non-const `T` from non-const arguments, and even accept const arguments. The new warning is therefore a valid true positive in code that was not analyzed before. ---- 44 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/s/spring/spring_106.0+dfsg.orig.tar.xz Result: your spring-106.0/rts/lib/assimp/contrib/irrXML/CXMLReaderImpl.h:653:16: style: C-style pointer casting [cstyleCast] Explanation: With the PR, Cppcheck now deduces template arguments from non-literal arguments, so calls such as `convertTextData(data16+1, data8, size)` instantiate the member template `convertTextData`. Before, the template body was never checked. Line 653, `TextBegin = (char_type*)source;`, really is a C-style cast between pointer types (e.g. a 16-bit char pointer to `char_type*`). A C++ cast such as `reinterpret_cast` would be the style-conforming form, so the cstyleCast warning is a correct new style finding in code that was not analyzed before. ---- 45 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/s/sqlitebrowser/sqlitebrowser_3.13.1.orig.tar.gz Result: main sqlitebrowser-sqlitebrowser-9a275c4/libs/qscintilla/lexlib/StyleContext.cpp:56:16: style: Parameter 'styler' can be declared as reference to const [constParameterReference] Explanation: In `getRangeLowered`, `styler` is a `LexAccessor&` used as `styler[start + i]`. Scintilla's `LexAccessor::operator[]` is non-const: it may call `Fill()` to refill its buffer. So `styler` cannot be a reference to const, and the `constParameterReference` warning was a false positive. The identical `getRange()` above it (no `MakeLowerCase`) was not warned about by main either. The only difference is the call through the `MakeLowerCase` template, which main could not instantiate for a non-literal argument. The PR deduces the template argument from the argument type, so that call is now instantiated. The warning disappears and the two functions are now treated consistently. ---- 46 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/t/teakra/teakra_0.0~git20250805.a66efb9.orig.tar.xz Result: your teakra-0.0~git20250805.a66efb9/src/test_generator.cpp:174:40: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Memory [valueFlowBailoutIncompleteVar] Explanation: The PR now deduces `ConfigWithArpAddress(r)` and instantiates the template body. In that copied body, `RegConfig::Memory` is not resolved as an enumerator, so ValueFlow bails out on the whole function, calling `Memory` an incomplete variable. The same expression in the non-template `ConfigWithAddress` (line 158) is resolved fine and produces no bailout. That suggests the incremental symbol-database update did not re-resolve the copied enumerator token. The new debug message reflects a gap in symbol resolution introduced by the PR's instantiation path, not missing information in the source. ---- 47 / 50 ---- Verdict: UNCLEAR (low confidence) Package: https://ftp.debian.org/debian/pool/main/t/texstudio/texstudio_4.9.7+ds.orig.tar.xz Result: main texstudio-4.9.7+ds/src/qcodeedit/lib/document/qdocument.cpp:3647:14: style:inconclusive: Function 'draw' argument 7 names different: declaration '' definition 'fullSel'. [funcArgNamesDifferentUnnamed] Explanation: The removed warning is about a non-template member function `QDocumentLineHandle::draw`, whose definition names its 7th parameter `fullSel`. The declaration in the header is not shown, so it cannot be checked whether that parameter really is unnamed there. If it is, the warning was a true positive. In that case its loss would be a side effect of the PR's symbol database changes, such as a definition getting unlinked from its declaration, and would be a regression. Without the header, it is not possible to decide. ---- 48 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/z/zimlib/zimlib_8.1.1.orig.tar.gz Result: main libzim-8.1.1/src/narrowdown.h:157:5: performance:inconclusive: Use const reference for '_left' to avoid unnecessary data copying. [redundantCopyLocalConst] Explanation: In libzim, `ASSERT(a, <=, b)` expands to something like `auto _left = a; auto _right = b;`. Here `a` and `b` are `const std::string&`, so each line makes a full string copy. The copies are only read, then passed by value to `_on_assert_fail`. A `const auto&` would avoid the copies, so the inconclusive redundantCopyLocalConst warning is a legitimate (if macro-located) true positive. The code did not change. The likely cause is the PR's new deduction logic: it instantiates `_on_assert_fail<...>` for the integer ASSERT calls (as the new ctunullpointer shows). It bails out for `std::string` arguments because they are containers, and the function template declaration is then removed. That leaves this string call without a known callee, so the check conservatively assumes `_left`/`_right` may be modified and drops the warning. Losing a valid warning because Cppcheck now understands the call less well is a regression. ---- 49 / 50 ---- Verdict: REGRESSION (low confidence) Package: https://ftp.debian.org/debian/pool/main/z/zimlib/zimlib_8.1.1.orig.tar.gz Result: main libzim-8.1.1/src/narrowdown.h:157:5: performance:inconclusive: Use const reference for '_right' to avoid unnecessary data copying. [redundantCopyLocalConst] Explanation: Line 157 is `ASSERT(a, <=, b)`, where `a` and `b` are `const std::string&`. In libzim the ASSERT macro copies its operands into locals (`auto _left = left; auto _right = right;`), compares them, and only passes them to `_on_assert_fail` when the check fails. Nothing modifies `_right`, so binding it as a const reference would avoid an unneeded std::string copy. The inconclusive redundantCopyLocalConst warning in main therefore looks like a valid, if low-value, finding. The PR adds type deduction for function templates. It does not deduce container types such as std::string, so it cannot have resolved this particular `_on_assert_fail` call. Nothing in the PR explains why `_right` should now count as modified. The disappearance is most likely a side effect of the changed template handling and symbol database rebuild, not better understanding of the code. That means a probable true positive was lost, though the debug.h macro source is not shown. ---- 50 / 50 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/z/zimlib/zimlib_8.1.1.orig.tar.gz Result: your libzim-8.1.1/src/debug.h:41:63: error: Null pointer dereference: b [ctunullpointer] libzim-8.1.1/src/compression.cpp:132:7: note: Assignment '_right=0u', assigned value is 0 libzim-8.1.1/src/compression.cpp:132:7: note: Assuming condition is true libzim-8.1.1/src/compression.cpp:132:7: note: Calling function _on_assert_fail < unsigned long , unsigned int >, 5th argument is null libzim-8.1.1/src/debug.h:41:63: note: Dereferencing argument b that is null Explanation: With the new type deduction, `_on_assert_fail(..., _left, _right, ...)` is instantiated as `_on_assert_fail`. The 5th parameter `b` is therefore a plain `unsigned int` holding 0. `ss << b` streams an integer and dereferences nothing, so 'Null pointer dereference: b' is a false positive. The CTU check treats an integer zero argument as a null pointer in the new instantiation. This added warning is a regression.