clang-tidy is a static analysis tool:
It analyzes C++ source code
It finds bugs, bad practices, and design issues
It uses the same compiler flags as your real build
Examples of what it catches:
Uninitialized variables
Dangling references
Inefficient copies
Dangerous implicit conversions
Missing explicit
Poor modern C++ usage
clang-format is a code formatter, not a compiler tool.
It:
Rewrites your C++ source code
Adjusts indentation, spacing, line breaks, brace style, etc and makes
code look consistent