Clang is a C/C++/Objective C compiler based on LLVM. It is distributed under the BSD Licence.
Install Official repositories.from the
Build packages with Clang
export CC=clang and (for C++)
export CXX=clang++ to your
NB: For packages that specify GCC-specific build options, there may be build errors that require either editing the source package, the pkgbuild or commenting out the clang lines in makepkg.conf.
Using the Static Analyzer
To analyze a project, simply place the word
scan-build in front of your build command. For example:
$ scan-build make
It is also possible to analyze specific files:
$ scan-build gcc -c t1.c t2.c