Static analysis is one way to root out more complex bugs in C and C++
programs. And clang offers a static code analyzer. To make use of it
as an analyze target in an autoconfed project, just add this snippet
to your Makefile.am.
Put the filenames you want analyzed on the analyze_srcs line. If you
have any local include dirs, just add them as -I flags to the clang
lines.
| |