blob: 29df8b9cca635935f5eba6c2456f849f0ca1a656 [file] [log] [blame]
Ted Kremenekcf2e3042008-06-19 23:14:24 +00001<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2 "http://www.w3.org/TR/html4/strict.dtd">
Ted Kremenekce2e3322008-04-25 18:44:36 +00003<html>
4<head>
Ted Kremenek92c23cb2008-06-17 06:38:07 +00005 <title>LLVM/Clang Static Analyzer</title>
Ted Kremenek20c5f142008-06-11 05:26:52 +00006 <link type="text/css" rel="stylesheet" href="menu.css" />
7 <link type="text/css" rel="stylesheet" href="content.css" />
Ted Kremenekce2e3322008-04-25 18:44:36 +00008</head>
9<body>
10
Ted Kremenek20c5f142008-06-11 05:26:52 +000011<!--#include virtual="menu.html.incl"-->
12
13<div id="content">
14
Ted Kremenek92c23cb2008-06-17 06:38:07 +000015<h1>LLVM/Clang Static Analyzer</h1>
Ted Kremenekce2e3322008-04-25 18:44:36 +000016
Ted Kremenek92c23cb2008-06-17 06:38:07 +000017<p>The LLVM/Clang static analyzer is a standalone tool that find bugs in C and
18Objective-C programs. Currently the analyzer is invoked as a command-line tool.
19It is intended to run in tandem with a build of a project or code base.</p>
Ted Kremenekbc757862008-06-12 18:39:02 +000020
21<p>Here are some important points we ask you to consider when using the static
22analyzer:</p>
23
24<ul>
25
26<li><b>This tool is <b>very early</b> in development.</b> There are many planned
27enhancements to improve both the precision and scope of its analysis algorithms
28as well as the kinds bugs it will find.</li>
29
Ted Kremenek414322c2008-06-17 06:47:58 +000030<li><b>Static analysis can be much slower than compilation.</b> While the
31analyzer is being designed to be as fast and light-weight as possible, please do
32not expect it to be as fast as compiling a program (even with optimizations
33enabled). Some of the algorithms needed to find bugs require in the worst case
34exponential time. The analyzer runs in a reasonable amount of time by both
35bounding the amount of checking work it will do as well as using clever
36algorithms to reduce the amount of work it must do to find bugs.</li>
Ted Kremenekbc757862008-06-12 18:39:02 +000037
Ted Kremeneka80e4482008-07-09 22:20:56 +000038<li><b>False positives.</b> Static analysis is not perfect. It can falsely flag
39bugs in a program where the code behaves correctly. Because some code checks
40require more analysis precision than others, the frequency of false positives
41can vary widely between different checks. Our eventual goal is to have the
42analyzer have a low false positive rate for most code on all checks.</li>
Ted Kremenekbc757862008-06-12 18:39:02 +000043</ul>
Ted Kremenekb8a522f2008-06-11 16:09:34 +000044
Ted Kremeneke597b192008-07-17 22:41:39 +000045<h3>Please tell us about False Positives</h3>
46
47<p>If you encounter a false positive, <b>please let us know</b> by <a
Ted Kremeneka80e4482008-07-09 22:20:56 +000048href="StaticAnalysisUsage.html#filingbugs">filing a bug report</a>. False
49positives cannot be addressed unless we know about them.</p>
50
Ted Kremeneke597b192008-07-17 22:41:39 +000051<h3>Want more bugs?</h3>
52
53<p>If there are specific kinds of bugs you would like the tool to find,
Ted Kremeneka80e4482008-07-09 22:20:56 +000054please feel free to file <a href="StaticAnalysisUsage.html#filingbugs">feature
Ted Kremeneke597b192008-07-17 22:41:39 +000055requests</a>.</p>
Ted Kremenekb8a522f2008-06-11 16:09:34 +000056
Ted Kremenek92c23cb2008-06-17 06:38:07 +000057<!-- Generated from: http://www.spiffycorners.com/index.php -->
Ted Kremenekce2e3322008-04-25 18:44:36 +000058
Ted Kremenek92c23cb2008-06-17 06:38:07 +000059<style type="text/css">
60.spiffy{display:block}
61.spiffy *{
62 display:block;
63 height:1px;
64 overflow:hidden;
65 font-size:.01em;
66 background:#EBF0FA}
67.spiffy1{
68 margin-left:3px;
69 margin-right:3px;
70 padding-left:1px;
71 padding-right:1px;
72 border-left:1px solid #f6f8fc;
73 border-right:1px solid #f6f8fc;
74 background:#f0f3fb}
75.spiffy2{
76 margin-left:1px;
77 margin-right:1px;
78 padding-right:1px;
79 padding-left:1px;
80 border-left:1px solid #fdfdfe;
81 border-right:1px solid #fdfdfe;
82 background:#eef2fa}
83.spiffy3{
84 margin-left:1px;
85 margin-right:1px;
86 border-left:1px solid #eef2fa;
87 border-right:1px solid #eef2fa;}
88.spiffy4{
89 border-left:1px solid #f6f8fc;
90 border-right:1px solid #f6f8fc}
91.spiffy5{
92 border-left:1px solid #f0f3fb;
93 border-right:1px solid #f0f3fb}
94.spiffyfg{
95 background:#EBF0FA}
Ted Kremenekce2e3322008-04-25 18:44:36 +000096
Ted Kremenek92c23cb2008-06-17 06:38:07 +000097.spiffyfg h2 {
98 margin:0px; padding:10px;
99}
100</style>
Ted Kremenekce2e3322008-04-25 18:44:36 +0000101
Ted Kremenek92c23cb2008-06-17 06:38:07 +0000102<style type="text/css">
103 #left { float:left; }
104 #left h2 { margin:1px; padding-top:0px; }
105 #right { float:left; margin-left:50px; padding:0px ;}
106 #right h2 { padding:0px; margin:0px; }
107 #wrappedcontent { padding:15px;}
108</style>
Ted Kremenekce2e3322008-04-25 18:44:36 +0000109
Ted Kremenek92c23cb2008-06-17 06:38:07 +0000110<div id="left">
111 <h2>Using the Analyzer</h2>
112 <ul>
113 <li><a href="StaticAnalysisUsage.html#Obtaining">Obtaining the Analyzer</a></li>
114 <li><a href="StaticAnalysisUsage.html#BasicUsage">Basic Usage</a></li>
115 <li><a href="StaticAnalysisUsage.html#Output">Output of the Analyzer</a></li>
116 <li><a href="StaticAnalysisUsage.html#RecommendedUsageGuidelines">Recommended Usage Guidelines</a></li>
117 <li><a href="StaticAnalysisUsage.html#Debugging">Debugging the Analyzer</a></li>
Ted Kremenekf7946752008-07-08 21:25:35 +0000118 <li><a href="StaticAnalysisUsage.html#filingbugs">Filing Bugs and Feature Requests</a></li>
Ted Kremenek92c23cb2008-06-17 06:38:07 +0000119 </ul>
120</div>
Ted Kremenekce2e3322008-04-25 18:44:36 +0000121
Ted Kremenek92c23cb2008-06-17 06:38:07 +0000122<div id="right">
123 <b class="spiffy">
124 <b class="spiffy1"><b></b></b>
125 <b class="spiffy2"><b></b></b>
126 <b class="spiffy3"></b>
127 <b class="spiffy4"></b>
128 <b class="spiffy5"></b></b>
Ted Kremenekce2e3322008-04-25 18:44:36 +0000129
Ted Kremenek92c23cb2008-06-17 06:38:07 +0000130 <div class="spiffyfg">
131 <div id="wrappedcontent">
132 <h2>Download</h2>
133 <ul>
Ted Kremeneke597b192008-07-17 22:41:39 +0000134 <li>Mac OS X (Intel-only, 10.5+):
Ted Kremenek34239e92008-06-17 06:43:11 +0000135 <p>
136 <!--#include virtual="latest_checker.html.incl"-->
137 </p>
138 </li>
Ted Kremenek92c23cb2008-06-17 06:38:07 +0000139 <li><a href="StaticAnalysisUsage.html#OtherUsage">Other Platforms</a> (Building from Source)</li>
140 </div>
141
142 </div>
Ted Kremenekce2e3322008-04-25 18:44:36 +0000143
Ted Kremenek92c23cb2008-06-17 06:38:07 +0000144 <b class="spiffy">
145 <b class="spiffy5"></b>
146 <b class="spiffy4"></b>
147 <b class="spiffy3"></b>
148 <b class="spiffy2"><b></b></b>
149 <b class="spiffy1"><b></b></b></b>
150</div>
Ted Kremenekbc757862008-06-12 18:39:02 +0000151
Ted Kremenekbe6e5162008-06-11 05:25:12 +0000152
Ted Kremenek20c5f142008-06-11 05:26:52 +0000153</div>
Ted Kremenekbe6e5162008-06-11 05:25:12 +0000154</body>
Ted Kremenek92c23cb2008-06-17 06:38:07 +0000155</html>
156