4 ms·
As I understand it the Clang static analyzer is not intended to be used directly. It's best to use it through CodeChecker, which provide high level commands and
by yaantc 3y ago
As I understand it the Clang static analyzer is not intended to be used directly. It's best to use it through CodeChecker, which provide high level commands and do the low level calls to the Clang SA (and also Clang tidy). In particular if you want whole project analysis (CTU, cross translation units analysis) CC will do the all the needed calls in a single "analyze" command.
[1] https://codechecker.readthedocs.io/en/latest/ https://codechecker.readthedocs.io/en/latest/
- bigdict 3y agoGod I love HN. It's like an office watercooler the size of a grain silo with thousands of programmers hanging around.
- unwind 3y agoNow that is a tshirt design I would get behind. Or into, I guess.
- wiseowise 3y agoHoly crap this is amazing.
- flohofwoe 3y agoI currently use `--analyze -Xanalyzer -analyzer-opt-analyze-headers` for checking my header-only libs in clang, but AFAIK the recommended workflow is to use clang-tidy which is better configurable than calling clang directly. If you're on Mac with Xcode, the static analyzer and the sanitizers ASAN, UBSAN and TSAN are simple UI checkboxes.
- einpoklum 3y agoThat codechecker thing is sooo tedios to install. Why do I need to 70 MB of environment for some python script which just wraps clang tools anyway? :-(