From ArchWiki
Revision as of 13:48, 6 December 2013 by Axper (Talk | contribs) (Added text to "Using the Static Analyzer" section and added References section)

Jump to: navigation, search

Clang is a compiler set based on LLVM. It is distributed under BSD Licence.


Install clang form the Official Repositories.

Build packages with Clang

Add export CC=clang and (for c++) export CXX=clang++ to your /etc/makepkg.conf.

Using the Static Analyzer

First install the clang-analyzer package. 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