diff --git a/www/StaticAnalysis.html b/www/StaticAnalysis.html index d5dcfed8f7..76e85e10ba 100644 --- a/www/StaticAnalysis.html +++ b/www/StaticAnalysis.html @@ -32,25 +32,43 @@

This documents provides some notes on using the LLVM/clang static analyzer to find bugs in C and Objective-C programs.

-

Please note that this tool is very early in development, and there are -many planned enhancements to improve both the precision and scope of its -analysis algorithms as well as the kinds bugs it will find.

- -

High-Level Summary

-

Currently the analyzer is invoked as a command-line tool. It is intended to -run in synchronous with a build of a project or code base. Analysis results are +run in tandem with a build of a project or code base. Analysis results are deposited in a directory as HTML files, which can then viewed using a web -browser.

+browser (open the generated index.html file to view a list of flagged +errors).

-

The analyzer performs a variety of checks on code, each requiring different -levels of analysis precision (more precision = more CPU time). While the -analyzer is being designed to be as fast and light-weight as possible, please -do not expect it to be as fast as compiling a program (even with -optimizations enabled). Some of the algorithms needed to find bugs require in -the worst case exponential time. The analyzer runs in a reasonable amount of -time by both bounding the amount of checking work it will do as well as using -clever algorithms to reduce the amount of work it must do to find bugs.

+

Important Notes (Please Read)

+ +

Here are some important points we ask you to consider when using the static +analyzer:

+ +

Organization

@@ -61,7 +79,8 @@ clever algorithms to reduce the amount of work it must do to find bugs.

  • Basic Usage
  • Output of the Analyzer
  • Recommended Usage Guidelines
  • -
  • Debugging the Analyzer +
  • Debugging the Analyzer
  • +
  • Filing Bugs
  • Obtaining the Analyzer

    @@ -77,19 +96,17 @@ other special installation is needed.

    Packaged Builds (Mac OS X)

    -

    Semi-regular pre-built binaries of the analyzer(packaged as a gzipped tar -file) are available on Mac OS X (10.5).

    +

    Semi-regular pre-built binaries of the analyzer are available on Mac OS X +(10.5).

    The latest build is: checker-36

    +href="http://keeda.stanford.edu/~kremenek/checker/checker-36.tar.gz">checker-36.tar.gz (built June 11, 2008)

    -

    The entire set of previous builds can be found here. Packaged builds for -other platforms may eventually be provided, but as the tool is in its early -stages we are not actively promoting releases yet. If you wish to help -contribute regular builds of the analyzer on other platforms, please email the -Clang Developers' -mailing list.

    +Packaged builds for other platforms may eventually be provided, but as the tool +is in its early stages we are not actively promoting releases yet. If you wish +to help contribute regular builds of the analyzer on other platforms, please +email the Clang +Developers' mailing list.

    Packaged builds of the analyzer expand to the following files:

    @@ -236,10 +253,10 @@ Here are a few recommendations with running the analyzer:

    Always Analyze a Project in its "Debug" Configuration

    -Most projects can be built in a "debug" mode that enables assertions. Assertions -are picked up by the static analyzer to prune infeasible paths, which in some -cases can greatly reduce the number of false positives (bogus error reports) -emitted by the tool. +

    Most projects can be built in a "debug" mode that enables assertions. +Assertions are picked up by the static analyzer to prune infeasible paths, which +in some cases can greatly reduce the number of false positives (bogus error +reports) emitted by the tool.

    Pass -k to scan-build

    @@ -254,24 +271,24 @@ compile-debug cycle.

    Use Verbose Output when Debugging scan-build

    -scan-build takes a -v option to emit verbose output about what -it's doing; two -v options emit more information. Redirecting the output -of scan-build to a text file (make sure to redirect standard error) is -useful for filing bug reports against scan-build or the analyzer, as we -can see the exact options (and files) passed to the analyzer. For more -comprehendible logs, don't perform a parallel build. +

    scan-build takes a -v option to emit verbose output about +what it's doing; two -v options emit more information. Redirecting the +output of scan-build to a text file (make sure to redirect standard +error) is useful for filing bug reports against scan-build or the +analyzer, as we can see the exact options (and files) passed to the analyzer. +For more comprehendible logs, don't perform a parallel build.

    Debugging the Analyzer

    -This section provides information on debugging the analyzer, and troubleshooting -it when you have problems analyzing a particular project. +

    This section provides information on debugging the analyzer, and troubleshooting +it when you have problems analyzing a particular project.

    How it Works

    -To analyze a project, scan-build simply sets the environment variable +

    To analyze a project, scan-build simply sets the environment variable CC to the full path to ccc-analyzer. It also sets a few other environment variables to communicate to ccc-analyzer where to dump HTML -report files. +report files.

    Some Makefiles (or equivalent project files) hardcode the compiler; for such projects simply overriding CC won't cause ccc-analyzer to be @@ -298,18 +315,21 @@ calling clang). ccc-analyzer tries to correctly forward all the arguments over to gcc, but this may not work perfectly (please report bugs of this kind). -

    Filing Bugs

    +

    Filing Bugs

    -We encourage users to file bug reports for any problems that they encounter. +

    We encourage users to file bug reports for any problems that they +encounter.

    -

    Outside Apple: Please file bugs (against -Clang) in LLVM's Bugzilla database.

    +

    Outside Apple

    + +

    Please file +bugs (against Clang) in LLVM's Bugzilla database.

    + +

    Apple-internal Users

    + +

    Please file bugs in Radar against the llvm - clang component.

    -

    Apple-internal: Please file bugs in Radar against the llvm - clang -component.

    - \ No newline at end of file diff --git a/www/content.css b/www/content.css index 7cb3b7f986..1dac1d5159 100644 --- a/www/content.css +++ b/www/content.css @@ -5,6 +5,10 @@ html, body { h1, h2, h3, tt { color: #000; } +h2 { padding-top: 1em; } +h3 { padding-top: 0.5em; margin-bottom: -0.25em; } +li { padding-bottom: 0.5em; } + /* Slides */ IMG.img_slide { display: block;