Analysis Tools for C++ Analysis Tools Analyzers
Sanitizers
- g++ -fsanitize=address
- clang++ -fsanitize=address
- cl.exe /fsanitize=address MSVC (as of 10/2019)
- g++ -fsanitize=undefined
- clang++ -fsanitize=undefined
- g++ -fsanitize=leak
- clang++ -fsanitize=leak
- g++ -fsanitize=thread
- clang++ -fsanitize=thread
Stand-Alone Analysis
clang-based linter tool, part of the extra clang tools
diagnoses programming errors, style violations, interface misuse
- code instrumentation framework
- runs program on a VM
- --tool=memcheck leak, invalid read/write detection
- --tool=callgrind runtime profiling
- --tool=cachegrind cache profiling
- --tool=massif heap memory profiling
- integration into various IDEs
- dynamic instrumentation (runs on unmodified binaries)
- leak detection
- invalid memory read/write detection
- heap memory profiler
- annotation of memory allocations
- memory leak detection
- integration into various IDEs
- source code analysis tool
- code quality metrics
- coding standard compliance analysis
- dependency visualization
- Visual Studio add-in
- commercial static code analysis tool
- IDE itegration (Visual Studio, VS Code, CLion, QtCreator, Eclipse)
clang-based #include
analyzer
analyzes C++ #include
dependencies
Comments…