blob: 9319157442f5fb67e6e276beaba11c80763ec957 [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 Kremeneka80e4482008-07-09 22:20:56 +000045<p>If you encounter a false positive, <b>please let us know about it</b> by <a
46href="StaticAnalysisUsage.html#filingbugs">filing a bug report</a>. False
47positives cannot be addressed unless we know about them.</p>
48
49<p>Further, if there are specific kinds of bugs you would like the tool to find,
50please feel free to file <a href="StaticAnalysisUsage.html#filingbugs">feature
51requests</a>.</p.>
Ted Kremenekb8a522f2008-06-11 16:09:34 +000052
Ted Kremenek92c23cb2008-06-17 06:38:07 +000053<!-- Generated from: http://www.spiffycorners.com/index.php -->
Ted Kremenekce2e3322008-04-25 18:44:36 +000054
Ted Kremenek92c23cb2008-06-17 06:38:07 +000055<style type="text/css">
56.spiffy{display:block}
57.spiffy *{
58 display:block;
59 height:1px;
60 overflow:hidden;
61 font-size:.01em;
62 background:#EBF0FA}
63.spiffy1{
64 margin-left:3px;
65 margin-right:3px;
66 padding-left:1px;
67 padding-right:1px;
68 border-left:1px solid #f6f8fc;
69 border-right:1px solid #f6f8fc;
70 background:#f0f3fb}
71.spiffy2{
72 margin-left:1px;
73 margin-right:1px;
74 padding-right:1px;
75 padding-left:1px;
76 border-left:1px solid #fdfdfe;
77 border-right:1px solid #fdfdfe;
78 background:#eef2fa}
79.spiffy3{
80 margin-left:1px;
81 margin-right:1px;
82 border-left:1px solid #eef2fa;
83 border-right:1px solid #eef2fa;}
84.spiffy4{
85 border-left:1px solid #f6f8fc;
86 border-right:1px solid #f6f8fc}
87.spiffy5{
88 border-left:1px solid #f0f3fb;
89 border-right:1px solid #f0f3fb}
90.spiffyfg{
91 background:#EBF0FA}
Ted Kremenekce2e3322008-04-25 18:44:36 +000092
Ted Kremenek92c23cb2008-06-17 06:38:07 +000093.spiffyfg h2 {
94 margin:0px; padding:10px;
95}
96</style>
Ted Kremenekce2e3322008-04-25 18:44:36 +000097
Ted Kremenek92c23cb2008-06-17 06:38:07 +000098<style type="text/css">
99 #left { float:left; }
100 #left h2 { margin:1px; padding-top:0px; }
101 #right { float:left; margin-left:50px; padding:0px ;}
102 #right h2 { padding:0px; margin:0px; }
103 #wrappedcontent { padding:15px;}
104</style>
Ted Kremenekce2e3322008-04-25 18:44:36 +0000105
Ted Kremenek92c23cb2008-06-17 06:38:07 +0000106<div id="left">
107 <h2>Using the Analyzer</h2>
108 <ul>
109 <li><a href="StaticAnalysisUsage.html#Obtaining">Obtaining the Analyzer</a></li>
110 <li><a href="StaticAnalysisUsage.html#BasicUsage">Basic Usage</a></li>
111 <li><a href="StaticAnalysisUsage.html#Output">Output of the Analyzer</a></li>
112 <li><a href="StaticAnalysisUsage.html#RecommendedUsageGuidelines">Recommended Usage Guidelines</a></li>
113 <li><a href="StaticAnalysisUsage.html#Debugging">Debugging the Analyzer</a></li>
Ted Kremenekf7946752008-07-08 21:25:35 +0000114 <li><a href="StaticAnalysisUsage.html#filingbugs">Filing Bugs and Feature Requests</a></li>
Ted Kremenek92c23cb2008-06-17 06:38:07 +0000115 </ul>
116</div>
Ted Kremenekce2e3322008-04-25 18:44:36 +0000117
Ted Kremenek92c23cb2008-06-17 06:38:07 +0000118<div id="right">
119 <b class="spiffy">
120 <b class="spiffy1"><b></b></b>
121 <b class="spiffy2"><b></b></b>
122 <b class="spiffy3"></b>
123 <b class="spiffy4"></b>
124 <b class="spiffy5"></b></b>
Ted Kremenekce2e3322008-04-25 18:44:36 +0000125
Ted Kremenek92c23cb2008-06-17 06:38:07 +0000126 <div class="spiffyfg">
127 <div id="wrappedcontent">
128 <h2>Download</h2>
129 <ul>
130 <li>Mac OS X (Intel-only, 10.5+):
Ted Kremenek34239e92008-06-17 06:43:11 +0000131 <p>
132 <!--#include virtual="latest_checker.html.incl"-->
133 </p>
134 </li>
Ted Kremenek92c23cb2008-06-17 06:38:07 +0000135 <li><a href="StaticAnalysisUsage.html#OtherUsage">Other Platforms</a> (Building from Source)</li>
136 </div>
137
138 </div>
Ted Kremenekce2e3322008-04-25 18:44:36 +0000139
Ted Kremenek92c23cb2008-06-17 06:38:07 +0000140 <b class="spiffy">
141 <b class="spiffy5"></b>
142 <b class="spiffy4"></b>
143 <b class="spiffy3"></b>
144 <b class="spiffy2"><b></b></b>
145 <b class="spiffy1"><b></b></b></b>
146</div>
Ted Kremenekbc757862008-06-12 18:39:02 +0000147
Ted Kremenekbe6e5162008-06-11 05:25:12 +0000148
Ted Kremenek20c5f142008-06-11 05:26:52 +0000149</div>
Ted Kremenekbe6e5162008-06-11 05:25:12 +0000150</body>
Ted Kremenek92c23cb2008-06-17 06:38:07 +0000151</html>
152