blob: f15d0d47ba1a94f16111236e5a76e161f2440de2 [file] [log] [blame]
Ted Kremenek8c003042008-04-25 18:44:36 +00001<html>
2<head>
Ted Kremeneka2de3682008-06-17 06:38:07 +00003 <title>LLVM/Clang Static Analyzer</title>
Ted Kremenek34423882008-06-11 05:26:52 +00004 <link type="text/css" rel="stylesheet" href="menu.css" />
5 <link type="text/css" rel="stylesheet" href="content.css" />
Ted Kremenek8c003042008-04-25 18:44:36 +00006</head>
7<body>
8
Ted Kremenek34423882008-06-11 05:26:52 +00009<!--#include virtual="menu.html.incl"-->
10
11<div id="content">
12
Ted Kremeneka2de3682008-06-17 06:38:07 +000013<h1>LLVM/Clang Static Analyzer</h1>
Ted Kremenek8c003042008-04-25 18:44:36 +000014
Ted Kremeneka2de3682008-06-17 06:38:07 +000015<p>The LLVM/Clang static analyzer is a standalone tool that find bugs in C and
16Objective-C programs. Currently the analyzer is invoked as a command-line tool.
17It is intended to run in tandem with a build of a project or code base.</p>
Ted Kremenek1a30cfd2008-06-12 18:39:02 +000018
19<p>Here are some important points we ask you to consider when using the static
20analyzer:</p>
21
22<ul>
23
24<li><b>This tool is <b>very early</b> in development.</b> There are many planned
25enhancements to improve both the precision and scope of its analysis algorithms
26as well as the kinds bugs it will find.</li>
27
28<li><b>False positives.</b> Static analysis reasons about the run-time behavior
29of a program without actually running the program. Static analysis is not
30perfect, and can falsely flag bugs in a program where the code behaves
31correctly. Because some code checks performed by the analyzer require more
32analysis than others, the frequency of false positives can vary widely between
33different checks. Our goal is to have the analyzer have a low false positive
34rate for most code on all checks, and we will reach this goal by gradually
35improving over time the analysis precision of the tool.</li>
36
37<li><b>Static analysis can be much slower than compilation.</b> The analyzer
38performs a variety of checks on code, each requiring different levels of
39analysis precision (more precision = more CPU time). While the analyzer is being
40designed to be as fast and light-weight as possible, please do not expect it to
41be as fast as compiling a program (even with optimizations enabled). Some of the
42algorithms needed to find bugs require in the worst case exponential time. The
43analyzer runs in a reasonable amount of time by both bounding the amount of
44checking work it will do as well as using clever algorithms to reduce the amount
45of work it must do to find bugs.</li>
46
47</ul>
Ted Kremenek44ef76a2008-06-11 16:09:34 +000048
Ted Kremenek44ef76a2008-06-11 16:09:34 +000049
Ted Kremeneka2de3682008-06-17 06:38:07 +000050<!-- Generated from: http://www.spiffycorners.com/index.php -->
Ted Kremenek8c003042008-04-25 18:44:36 +000051
Ted Kremeneka2de3682008-06-17 06:38:07 +000052<style type="text/css">
53.spiffy{display:block}
54.spiffy *{
55 display:block;
56 height:1px;
57 overflow:hidden;
58 font-size:.01em;
59 background:#EBF0FA}
60.spiffy1{
61 margin-left:3px;
62 margin-right:3px;
63 padding-left:1px;
64 padding-right:1px;
65 border-left:1px solid #f6f8fc;
66 border-right:1px solid #f6f8fc;
67 background:#f0f3fb}
68.spiffy2{
69 margin-left:1px;
70 margin-right:1px;
71 padding-right:1px;
72 padding-left:1px;
73 border-left:1px solid #fdfdfe;
74 border-right:1px solid #fdfdfe;
75 background:#eef2fa}
76.spiffy3{
77 margin-left:1px;
78 margin-right:1px;
79 border-left:1px solid #eef2fa;
80 border-right:1px solid #eef2fa;}
81.spiffy4{
82 border-left:1px solid #f6f8fc;
83 border-right:1px solid #f6f8fc}
84.spiffy5{
85 border-left:1px solid #f0f3fb;
86 border-right:1px solid #f0f3fb}
87.spiffyfg{
88 background:#EBF0FA}
Ted Kremenek8c003042008-04-25 18:44:36 +000089
Ted Kremeneka2de3682008-06-17 06:38:07 +000090.spiffyfg h2 {
91 margin:0px; padding:10px;
92}
93</style>
Ted Kremenek8c003042008-04-25 18:44:36 +000094
Ted Kremeneka2de3682008-06-17 06:38:07 +000095<style type="text/css">
96 #left { float:left; }
97 #left h2 { margin:1px; padding-top:0px; }
98 #right { float:left; margin-left:50px; padding:0px ;}
99 #right h2 { padding:0px; margin:0px; }
100 #wrappedcontent { padding:15px;}
101</style>
Ted Kremenek8c003042008-04-25 18:44:36 +0000102
Ted Kremeneka2de3682008-06-17 06:38:07 +0000103<div id="left">
104 <h2>Using the Analyzer</h2>
105 <ul>
106 <li><a href="StaticAnalysisUsage.html#Obtaining">Obtaining the Analyzer</a></li>
107 <li><a href="StaticAnalysisUsage.html#BasicUsage">Basic Usage</a></li>
108 <li><a href="StaticAnalysisUsage.html#Output">Output of the Analyzer</a></li>
109 <li><a href="StaticAnalysisUsage.html#RecommendedUsageGuidelines">Recommended Usage Guidelines</a></li>
110 <li><a href="StaticAnalysisUsage.html#Debugging">Debugging the Analyzer</a></li>
111 <li><a href="StaticAnalysisUsage.html#filingbugs">Filing Bugs</a></li>
112 </ul>
113</div>
Ted Kremenek8c003042008-04-25 18:44:36 +0000114
Ted Kremeneka2de3682008-06-17 06:38:07 +0000115<div id="right">
116 <b class="spiffy">
117 <b class="spiffy1"><b></b></b>
118 <b class="spiffy2"><b></b></b>
119 <b class="spiffy3"></b>
120 <b class="spiffy4"></b>
121 <b class="spiffy5"></b></b>
Ted Kremenek8c003042008-04-25 18:44:36 +0000122
Ted Kremeneka2de3682008-06-17 06:38:07 +0000123 <div class="spiffyfg">
124 <div id="wrappedcontent">
125 <h2>Download</h2>
126 <ul>
127 <li>Mac OS X (Intel-only, 10.5+):
Ted Kremenek73855992008-06-17 06:43:11 +0000128 <p>
129 <!--#include virtual="latest_checker.html.incl"-->
130 </p>
131 </li>
Ted Kremeneka2de3682008-06-17 06:38:07 +0000132 <li><a href="StaticAnalysisUsage.html#OtherUsage">Other Platforms</a> (Building from Source)</li>
133 </div>
134
135 </div>
Ted Kremenek8c003042008-04-25 18:44:36 +0000136
Ted Kremeneka2de3682008-06-17 06:38:07 +0000137 <b class="spiffy">
138 <b class="spiffy5"></b>
139 <b class="spiffy4"></b>
140 <b class="spiffy3"></b>
141 <b class="spiffy2"><b></b></b>
142 <b class="spiffy1"><b></b></b></b>
143</div>
Ted Kremenek1a30cfd2008-06-12 18:39:02 +0000144
Ted Kremenek79310de2008-06-11 05:25:12 +0000145
Ted Kremenek34423882008-06-11 05:26:52 +0000146</div>
Ted Kremenek79310de2008-06-11 05:25:12 +0000147</body>
Ted Kremeneka2de3682008-06-17 06:38:07 +0000148</html>
149