Menu

Cppcheck 2.22.0

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() (bb630c244, 3f2d60c4b), Tokenizer::simplifyTypedef() (71de6753d, 3deb36d1f, 592e7b7c2), Tokenizer::simplifyUsing() (9162aa7fb, 7d5a54cc6), Tokenizer::findGarbageCode() (08db3048d) and ReverseTraversal::traverse() (3a3184de2, 5aa31d0da).
  • 6d2b6f4a5 Fix #14974 [regression] inline suppression does not work with build dir anymore.
  • 9a500c866 Fix #14972 [regression] Syntax Error: AST broken, '!' doesn't have an operand.

New checks:

  • 0d7884dad Warn when feof() is used as a while loop condition (wrongfeofUsage).
  • 04091bd59 ftell() result is unspecified when file is opened in mode "t".
  • 3d88880e8 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).
  • f695ade7f Detect switch cases that cannot be selected when the switch condition has a known value (unreachableSwitchCase).

C/C++ support:

  • b878dc223 Support C++23 'if consteval' / 'if !consteval'.
  • 7a8c67ab4 Fix #15007 isAttributeNoreturn not set for _Noreturn.

GUI:

  • f81f6f0e7 Fix #14829 Platform configuration mismatch between UI selection and analysis log.
  • 9f74c2db8 Fix #14813 crash: recheck in GUI sometimes crashes.
  • 550189be6 Fix #14738 GUI recheck of files not working properly when importing compile_commands.json.
  • 8f7666dd3 Fix #14983 GUI: exclude file with relative path.
  • 6640862c9 Fix #14933 each GUI log entry line should be output on a separate line.
  • 5799d47ee Removed GUI compliance report instructions (feature removed).

Suppressions:

  • 93546a2bc XML suppression file: added macro attribute for specifying macro name.
  • fecb3496f Fix #14959 Warning hash for token-based warnings.
  • f6fff71c1 Fix #15013 Calculate warning hash for CTU warnings.
  • 0b5998407 Baseline functionality (script and documentation).
  • 637d5be67 Suppression file name cache. (performance)
  • c976cac0e ErrorLogger: do not open and read from files unless necessary (performance).

Import project:

  • d32c01d1b Added support for Folders in slnx project files, skip non-C++ projects.
  • 9408a1d22 Added support for vcxproj ExcludedFromBuild.
  • bf099d1d1 Import project: handle forced include files from compilation database projects.
  • 3a9750e31 Flexible handling of -isystem, --sysroot and -I flags in compile_commands.json through the script tweak-compile_commands.py.

Infrastructure & dependencies:

  • 4e62f0cca Fix #14614 Optionally provide comments in preprocessor output (BuildCache).
  • ff4d7ce36 Fix #14987 Update simplecpp to 1.9.1.

Other:

  • 1fb66305f Added configuration file for Microsoft.GSL (Guideline Support Library).
  • 167f49dce, 5aec67c33, 767ace640 man/checkers: documented remaining checkers and fixed guideline classifications for MISRA C++.
Posted by Daniel Marjamäki 18 hours ago Labels: 2.22.0

Log in to post a comment.