4 ms·
Clang static analyzer and tidy through CodeChecker [1]. Plus the compiler warnings of course. This to complement unit and integration tests in simulation, with
by yaantc 3y ago
Clang static analyzer and tidy through CodeChecker [1]. Plus the compiler warnings of course.
This to complement unit and integration tests in simulation, with all sanitizers (UBSAN, ASAN, MSAN, TSAN).
Both are useful. In practice, the runtime tests catch most bugs. But now and then some bug sleeps through and is caught by the Clang static analyzer. It's always impressive to see a display of 30+ steps leading from an initial condition to a bug.
Finding bugs is the the static analyzer really. Clang tidy (a linter) is for code "cleanliness" and avoiding dangerous constructs. But I don't remember tidy finding a real issue, contrary to the static analyzer.
[1] https://codechecker.readthedocs.io/en/latest/ https://codechecker.readthedocs.io/en/latest/