Release Notes for Cppcheck 2.22
Major bug fixes & crashes:
- Fixed a large number of fuzzer-found crashes and hangs in the tokenizer and template simplifier, e.g. TemplateSimplifier::expandTemplate() (bb630c2, 3f2d60c), Tokenizer::simplifyTypedef() (71de675, 3deb36d, 592e7b7), Tokenizer::simplifyUsing() (9162aa7, 7d5a54c), Tokenizer::findGarbageCode() (08db304) and ReverseTraversal::traverse() (3a3184d, 5aa31d0).
- 6d2b6f4 Fix #14974 [regression] inline suppression does not work with build dir anymore.
- 9a500c8 Fix #14972 [regression] Syntax Error: AST broken, '!' doesn't have an operand.
New checks:
- 0d7884d Warn when feof() is used as a while loop condition (wrongfeofUsage).
- 04091bd ftell() result is unspecified when file is opened in mode "t".
- 3d88880 Detect when an STL algorithm such as std::copy, std::equal, std::transform, etc. accesses more elements through an iterator than are available in the container (algorithmOutOfBounds).
- f695ade Detect switch cases that cannot be selected when the switch condition has a known value (unreachableSwitchCase).
C/C++ support:
- b878dc2 Support C++23 'if consteval' / 'if !consteval'.
- 7a8c67a Fix #15007
isAttributeNoreturnnot set for_Noreturn.
GUI:
- f81f6f0 Fix #14829 Platform configuration mismatch between UI selection and analysis log.
- 9f74c2d Fix #14813 crash: recheck in GUI sometimes crashes.
- 550189b Fix #14738 GUI recheck of files not working properly when importing compile_commands.json.
- 8f7666d Fix #14983 GUI: exclude file with relative path.
- 6640862 Fix #14933 each GUI log entry line should be output on a separate line.
- 5799d47 Removed GUI compliance report instructions (feature removed).
Suppressions:
- 93546a2 XML suppression file: added macro attribute for specifying macro name.
- fecb349 Fix #14959 Warning hash for token-based warnings.
- f6fff71 Fix #15013 Calculate warning hash for CTU warnings.
- 0b59984 Baseline functionality (script and documentation).
- 637d5be Suppression file name cache. (performance)
- c976cac ErrorLogger: do not open and read from files unless necessary (performance).
Import project:
- d32c01d Added support for Folders in slnx project files, skip non-C++ projects.
- 9408a1d Added support for vcxproj ExcludedFromBuild.
- bf099d1 Import project: handle forced include files from compilation database projects.
- 3a9750e Flexible handling of -isystem, --sysroot and -I flags in compile_commands.json through the script tweak-compile_commands.py.
Infrastructure & dependencies:
- 4e62f0c Fix #14614 Optionally provide comments in preprocessor output (BuildCache).
- ff4d7ce Fix #14987 Update simplecpp to 1.9.1.
Other: