blob: 0444f0d12b503ff68ad5bef36192952b440d9987 [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
Ted Kremenekf415b3f2008-06-17 06:47:58 +000028<li><b>False positives.</b> Static analysis is not perfect. It can falsely flag
29bugs in a program where the code behaves correctly. Because some code checks
30require more analysis precision than others, the frequency of false positives
31can vary widely between different checks. Our eventual goal is to have the
32analyzer have a low false positive rate for most code on all checks.</li>
Ted Kremenek1a30cfd2008-06-12 18:39:02 +000033
Ted Kremenekf415b3f2008-06-17 06:47:58 +000034<li><b>Static analysis can be much slower than compilation.</b> While the
35analyzer is being designed to be as fast and light-weight as possible, please do
36not expect it to be as fast as compiling a program (even with optimizations
37enabled). Some of the algorithms needed to find bugs require in the worst case
38exponential time. The analyzer runs in a reasonable amount of time by both
39bounding the amount of checking work it will do as well as using clever
40algorithms to reduce the amount of work it must do to find bugs.</li>
Ted Kremenek1a30cfd2008-06-12 18:39:02 +000041
42</ul>
Ted Kremenek44ef76a2008-06-11 16:09:34 +000043
Ted Kremenek44ef76a2008-06-11 16:09:34 +000044
Ted Kremeneka2de3682008-06-17 06:38:07 +000045<!-- Generated from: http://www.spiffycorners.com/index.php -->
Ted Kremenek8c003042008-04-25 18:44:36 +000046
Ted Kremeneka2de3682008-06-17 06:38:07 +000047<style type="text/css">
48.spiffy{display:block}
49.spiffy *{
50 display:block;
51 height:1px;
52 overflow:hidden;
53 font-size:.01em;
54 background:#EBF0FA}
55.spiffy1{
56 margin-left:3px;
57 margin-right:3px;
58 padding-left:1px;
59 padding-right:1px;
60 border-left:1px solid #f6f8fc;
61 border-right:1px solid #f6f8fc;
62 background:#f0f3fb}
63.spiffy2{
64 margin-left:1px;
65 margin-right:1px;
66 padding-right:1px;
67 padding-left:1px;
68 border-left:1px solid #fdfdfe;
69 border-right:1px solid #fdfdfe;
70 background:#eef2fa}
71.spiffy3{
72 margin-left:1px;
73 margin-right:1px;
74 border-left:1px solid #eef2fa;
75 border-right:1px solid #eef2fa;}
76.spiffy4{
77 border-left:1px solid #f6f8fc;
78 border-right:1px solid #f6f8fc}
79.spiffy5{
80 border-left:1px solid #f0f3fb;
81 border-right:1px solid #f0f3fb}
82.spiffyfg{
83 background:#EBF0FA}
Ted Kremenek8c003042008-04-25 18:44:36 +000084
Ted Kremeneka2de3682008-06-17 06:38:07 +000085.spiffyfg h2 {
86 margin:0px; padding:10px;
87}
88</style>
Ted Kremenek8c003042008-04-25 18:44:36 +000089
Ted Kremeneka2de3682008-06-17 06:38:07 +000090<style type="text/css">
91 #left { float:left; }
92 #left h2 { margin:1px; padding-top:0px; }
93 #right { float:left; margin-left:50px; padding:0px ;}
94 #right h2 { padding:0px; margin:0px; }
95 #wrappedcontent { padding:15px;}
96</style>
Ted Kremenek8c003042008-04-25 18:44:36 +000097
Ted Kremeneka2de3682008-06-17 06:38:07 +000098<div id="left">
99 <h2>Using the Analyzer</h2>
100 <ul>
101 <li><a href="StaticAnalysisUsage.html#Obtaining">Obtaining the Analyzer</a></li>
102 <li><a href="StaticAnalysisUsage.html#BasicUsage">Basic Usage</a></li>
103 <li><a href="StaticAnalysisUsage.html#Output">Output of the Analyzer</a></li>
104 <li><a href="StaticAnalysisUsage.html#RecommendedUsageGuidelines">Recommended Usage Guidelines</a></li>
105 <li><a href="StaticAnalysisUsage.html#Debugging">Debugging the Analyzer</a></li>
106 <li><a href="StaticAnalysisUsage.html#filingbugs">Filing Bugs</a></li>
107 </ul>
108</div>
Ted Kremenek8c003042008-04-25 18:44:36 +0000109
Ted Kremeneka2de3682008-06-17 06:38:07 +0000110<div id="right">
111 <b class="spiffy">
112 <b class="spiffy1"><b></b></b>
113 <b class="spiffy2"><b></b></b>
114 <b class="spiffy3"></b>
115 <b class="spiffy4"></b>
116 <b class="spiffy5"></b></b>
Ted Kremenek8c003042008-04-25 18:44:36 +0000117
Ted Kremeneka2de3682008-06-17 06:38:07 +0000118 <div class="spiffyfg">
119 <div id="wrappedcontent">
120 <h2>Download</h2>
121 <ul>
122 <li>Mac OS X (Intel-only, 10.5+):
Ted Kremenek73855992008-06-17 06:43:11 +0000123 <p>
124 <!--#include virtual="latest_checker.html.incl"-->
125 </p>
126 </li>
Ted Kremeneka2de3682008-06-17 06:38:07 +0000127 <li><a href="StaticAnalysisUsage.html#OtherUsage">Other Platforms</a> (Building from Source)</li>
128 </div>
129
130 </div>
Ted Kremenek8c003042008-04-25 18:44:36 +0000131
Ted Kremeneka2de3682008-06-17 06:38:07 +0000132 <b class="spiffy">
133 <b class="spiffy5"></b>
134 <b class="spiffy4"></b>
135 <b class="spiffy3"></b>
136 <b class="spiffy2"><b></b></b>
137 <b class="spiffy1"><b></b></b></b>
138</div>
Ted Kremenek1a30cfd2008-06-12 18:39:02 +0000139
Ted Kremenek79310de2008-06-11 05:25:12 +0000140
Ted Kremenek34423882008-06-11 05:26:52 +0000141</div>
Ted Kremenek79310de2008-06-11 05:25:12 +0000142</body>
Ted Kremeneka2de3682008-06-17 06:38:07 +0000143</html>
144