Quality and Debugging

Quality and Debugging

Static analysis, formatting, sanitizers, and include-management tools for catching C++ problems earlier.

Quality and Debugging

Static analysis and formatting

Sanitizers

Practical guidance

When to use this page

Suggested workflow order

  1. Run clang-format to remove style noise before inspection.
  2. Run clang-tidy to catch structural and API-level issues.
  3. Run AddressSanitizer for memory-heavy code paths.
  4. Add UndefinedBehaviorSanitizer when logic bugs may involve invalid operations.
  5. Add ThreadSanitizer for concurrent code or suspected races.

The point is to move from cheap broad feedback toward heavier runtime diagnostics only when they are relevant.

Example in practice

  1. Pick one resource from this page.
  2. Use it to answer one concrete question about syntax, tooling, or workflow.
  3. Bring the result back into a local example or project build.