Skip to content

Releases: PKEuS/LCppC

LCppC 1.1

30 Aug 11:45
Compare
Choose a tag to compare

This release focuses on bringing back useful checks that got lost in recent years
of Cppcheck development and improving existing checks to fix false negatives -
besides fixing bugs from the first release. Additionally, a first preview of
a new GUI is included in the release.

New Features:

  • New Check: Char given as third parameter to memset()
    (One half restored functionality from Cppcheck 1.87, the other half is new)

  • New Check: Allocation of memory with negative size with new[] or as VLAs
    (Restored functionality from Cppcheck 1.87)

  • New Check: Detect usage of command line arguments without checking their size
    (Restored functionality from Cppcheck 1.87)

  • New Check: Detect incorrect usage of mutexes and lock guards (also in upcoming Cppcheck 2.2)

  • New Check: Dereferencing out of bounds and end iterators (also in upcoming Cppcheck 2.2)

  • New Check: Detect iteration over empty container (also in upcoming Cppcheck 2.2)

  • Initial support for C++20 features: modules, consteval and constinit

  • New library microsoft_unittest.cfg: Microsoft CppUnitTest library (also in upcoming Cppcheck 2.2)

  • GUI: Work in progress, so far only supporting a scratchpad to test small code snippets

Improvements:

  • Improved various checks to support more generic code:

    • Usage of std::string::c_str()

    • Filling arrays incompletely in a suspicious manner

    • Comparison of string literals with char*

    • Replaced specific check for usage of pipe() by CheckBufferOverrun and Library configuration

    • Usage of mismatching iterators

    • Detect known conditions when sizeof is involved (also in upcoming Cppcheck 2.2)

    • Support more simple class types in unused variable checking (also in upcoming Cppcheck 2.2)

  • Improved detection whether a function modifies its parameters in various checks

  • A couple of small performance and memory usage optimizations

  • Support iterators in ValueType parsing. The type of iterator is defined by Library configuration

  • Avoid false positives caused by #if/ifdef in several checks (also in upcoming Cppcheck 2.2)

  • Improved std.cfg, wxwidgets.cfg and windows.cfg (also in upcoming Cppcheck 2.2)

  • Improved --showtime results for better readability and usability and fixed times for nested timers

  • Improved accuracy of ValueFlow analysis (also in upcoming Cppcheck 2.2)

  • Ensure that Libraries are only loaded once

Bugfixes:

  • Fixed a major regression in LCppC 1.0 that made whole program analysis partially ineffective

  • Fixed AST and template parsing in some scenarios (also in upcoming Cppcheck 2.2)

  • Lots of other bugs were fixed

Notes:

  • The check for correct return type of operator=, removed in upcoming Cppcheck 2.2, was kept in LCppC.

  • LCppC retained the approach on comparison of boolean expressions with integers from CppCheck 2.1 and earlier.

  • The message hash introduced in upcoming Cppcheck 2.2 is not part of LCppC.

LCppC 1.0

14 Jun 08:27
Compare
Choose a tag to compare

This first release of LCppC contains lots of breaking changes compared to Cppcheck 2.0.
Future releases of LCppC are expected to be compatible with LCppC 1.0.

Breaking Changes (compared to Cppcheck 2.0):

  • The command line interface was changed to offer a consistent and flexible configuration.

    • New options (details see below):
      --certainty=, --checks=, --severity=, --ouput=

    • Replaced options:
      --enable=, --inconclusive, -q, --report-progress

    • Removed options:
      --clang, -l, --project=, --project-configuration=, --plist-output=

    • Default ouput format was changed back to single line messages.
      This involves that --template= does no longer has a template "cppcheck1",
      but "cppcheck2" instead to get the message format of Cppcheck 2.0.

    • Progress and status reports are disabled by default.
      This is equivalent to setting -q in Cppcheck. These messages can be enabled
      again with --output=status,progress.

  • A modern C++ compiler and std::thread support is now required. The code is tested against:
    Clang 8, GCC 8, Visual Studio 2019

Removed Features:

  • Clang and Clang-tidy integration.

  • Project files support
    This drops the import of foreign project files and cppcheck projects. The latter might be added back in a future release.

  • "Bughunting" mode introduced in Cppcheck 2.0.

  • Capability to output .plist files.

  • CMake makefiles were removed.

  • GUI is not maintained in LCppC and can not be considered part of this release. It might be added back in a future release.
    Cppcheck 2.0 GUI is not compatible to LCppC.

  • Continouus integration (Travis, Appveyor, IRC bots) is no longer maintained and was removed.

  • xcode project was removed (also in Cppcheck 2.1)

  • Limiting CPU load with -l has been removed (was unix only)

New Features:

  • Command line interface received a major upgrade with the following new features:

    • Option groups (--option=) with a flexible syntax to add and remove options.

    • New option --checks= to enable/disable particular checks
      For example: --checks=-all,UnusedFunction enables only unused function checking

    • New option --severity= to enable/disable checks with given message severities
      It mostly replaces --enable=, but with consistent behaviour now

    • New option --output= to control type of information displayed
      For example: --output=progress,status enables progress reports and checking status

    • New option --certainty= replacing --inconclusive, with the additional capability to enable experimental checks

    • Option -j can be used without a number. The number of threads is then determined automatically.

  • New Check: Detect iterator mismatch when inserting/erasing from container (also in Cppcheck 2.1)

  • New Check: Detect modulo of one (also in Cppcheck 2.1)

Improvements:

  • Major reduction of memory consumption when checking large files (also in Cppcheck 2.1)

  • Major performance improvements (partially also in Cppcheck 2.1)

  • Reimplemented mulithreading support based on std::thread (platform independant)

  • Reimplemented unused function checking: Now compatible with multithreading.

  • Reimplemented whole program analysis and result caching. Both should work now.

  • Improved accuracy of ValueFlow analysis (also in Cppcheck 2.1)

  • Improved wxwidgets.cfg and windows.cfg (also in Cppcheck 2.1)

Bugfixes:

  • Fixed AST in some scenarios (also in Cppcheck 2.1)

  • Fixed test suite been broken in a subtle way since 2018 (also in Cppcheck 2.1)

  • Lots of other bugs were fixed

Improved Build Systems:

  • Makefile (generated with dmake):

    • Takes parameter DEBUG=yes to compile with debug CXXFLAGS, otherwise create optimized build.
    • Optimize with -O2 -march=native -mtune=native.
    • Create debug builds with -Og.
    • Use a precompiled header file
    • Turned on many warnings again.
  • Visual Studio:

    • Much faster build due to improved precompiled headers (also in Cppcheck 2.1)
    • Turned on many warnings again.