Download Cppcheck 2 for Windows 7, 8, 10, 11 - A static code analysis tool for the C and C++ programming languages for memory leaks, mismatching allocation-deallocation, buffer overrun, and more
Cppcheck supports a wide variety of static checks that may not be covered by the compiler itself. These checks are static analysis checks that can be performed at a source code level. The program is directed towards static analysis checks that are rigorous, rather than heuristic in nature.
Some of the checks that are supported include:
- Automatic variable checking
- Bounds checking for array overruns
- Classes checking (e.g. unused functions, variable initialization and memory duplication)
- Usage of deprecated or superseded functions according to Open Group
- Exception safety checking, for example usage of memory allocation and destructor checks
- Memory leaks, e.g. due to lost scope without deallocation
- Resource leaks, e.g. due to forgetting to close a file handle
- Invalid usage of Standard Template Library functions and idioms
- Dead code elimination using unusedFunction option
- Miscellaneous stylistic and performance errors.
- Unique code analysis that detect various kinds of bugs in your code.
- Both command line interface and graphical user interface are available.
- Cppcheck has a strong focus on detecting undefined behaviour.