Obtaining the Static Analyzer

This page describes how to download and install the analyzer. Once the analyzer is installed, follow the instructions on using scan-build to get started analyzing your code.

Packaged Builds (Mac OS X)

Semi-regular pre-built binaries of the analyzer are available on Mac OS X. These are built to run on OS X 10.7 and later.

Builds are released frequently. Often the differences between build numbers being a few bug fixes or minor feature improvements. When using the analyzer, we recommend that you check back here occasionally for new builds, especially if the build you are using is more than a couple weeks old.

The latest build is:

Packaged builds for other platforms may eventually be provided, but we need volunteers who are willing to help provide such regular builds. If you wish to help contribute regular builds of the analyzer on other platforms, please email the Clang Developers' mailing list.

Using Packaged Builds

To use a package build, simply unpack it anywhere. If the build archive has the name checker-XXX.tar.bz2 then the archive will expand to a directory called checker-XXX. You do not need to place this directory or the contents of this directory in any special place. Uninstalling the analyzer is as simple as deleting this directory.

Most of the files in the checker-XXX directory will be supporting files for the analyzer that you can simply ignore. Most users will only care about two files, which are located at the top of the checker-XXX directory:

Running scan-build

For specific details on using scan-build, please see scan-build's documentation.

To run scan-build, either add the checker-XXX directory to your path or specify a complete path for scan-build when running it. It is also possible to use a symbolic link to scan-build, such one located in a directory in your path. When scan-build runs it will automatically determine where to find its accompanying files.

Other Platforms (Building the Analyzer from Source)

For other platforms, you must build Clang and LLVM manually. To do so, please follow the instructions for building Clang from source code.

Once the Clang is built, you need to add the following to your path: