News for hackers. Stuff that matters.
Re:My favorite C compiler flags during development by pabs3 on Saturday April 29, 2023 @11:30PM (#35759462)
Clang's static analyzer can be run by wrapping your build with scan-build:

    scan-build make
Re:My favorite C compiler flags during development by HybridCurve on Sunday April 30, 2023 @02:23AM (#35760119)
I like scan-build better than codechecker, but codechecker is the only thing that does CTU, which is much more thorough.

That being said, codechecker is not that great in terms of it's interface. Over all, it really needs to be implemented in a GUI application as there are many many fine tuning flags you can set with the clang analyzer (as well as potential for parallelization) that either cant be taken advantage of, or is too cumbersome to use codechecker to do.

Re:My favorite C compiler flags during development by pabs3 on Sunday April 30, 2023 @08:17PM (#35767781)
For those like me who weren't aware of CTU, it is Cross Translation Unit analysis:

https://codechecker.readthedocs.io/en/latest/analyzer/user_g...

I noticed that codechecker can also ingest results from many different tools other than Clang:

https://codechecker.readthedocs.io/en/latest/supported_code_...