blob: a53caaeb7d696a9f1e28d82f776bfce6ec21e754 [file] [log] [blame]
Ted Kremenekc028e242008-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 Kremenek8c003042008-04-25 18:44:36 +00003<html>
4<head>
Ted Kremeneka2de3682008-06-17 06:38:07 +00005 <title>LLVM/Clang Static Analyzer</title>
Ted Kremenek34423882008-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 Kremenek8c003042008-04-25 18:44:36 +00008</head>
9<body>
10
Ted Kremenek34423882008-06-11 05:26:52 +000011<!--#include virtual="menu.html.incl"-->
12
13<div id="content">
14
Ted Kremeneka2de3682008-06-17 06:38:07 +000015<h1>LLVM/Clang Static Analyzer</h1>
Ted Kremenek8c003042008-04-25 18:44:36 +000016
Ted Kremeneka2de3682008-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 Kremenek1a30cfd2008-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 Kremenekf415b3f2008-06-17 06:47:58 +000030<li><b>False positives.</b> Static analysis is not perfect. It can falsely flag
31bugs in a program where the code behaves correctly. Because some code checks
32require more analysis precision than others, the frequency of false positives
33can vary widely between different checks. Our eventual goal is to have the
34analyzer have a low false positive rate for most code on all checks.</li>
Ted Kremenek1a30cfd2008-06-12 18:39:02 +000035
Ted Kremenekf415b3f2008-06-17 06:47:58 +000036<li><b>Static analysis can be much slower than compilation.</b> While the
37analyzer is being designed to be as fast and light-weight as possible, please do
38not expect it to be as fast as compiling a program (even with optimizations
39enabled). Some of the algorithms needed to find bugs require in the worst case
40exponential time. The analyzer runs in a reasonable amount of time by both
41bounding the amount of checking work it will do as well as using clever
42algorithms to reduce the amount of work it must do to find bugs.</li>
Ted Kremenek1a30cfd2008-06-12 18:39:02 +000043
44</ul>
Ted Kremenek44ef76a2008-06-11 16:09:34 +000045
Ted Kremenek44ef76a2008-06-11 16:09:34 +000046
Ted Kremeneka2de3682008-06-17 06:38:07 +000047<!-- Generated from: http://www.spiffycorners.com/index.php -->
Ted Kremenek8c003042008-04-25 18:44:36 +000048
Ted Kremeneka2de3682008-06-17 06:38:07 +000049<style type="text/css">
50.spiffy{display:block}
51.spiffy *{
52 display:block;
53 height:1px;
54 overflow:hidden;
55 font-size:.01em;
56 background:#EBF0FA}
57.spiffy1{
58 margin-left:3px;
59 margin-right:3px;
60 padding-left:1px;
61 padding-right:1px;
62 border-left:1px solid #f6f8fc;
63 border-right:1px solid #f6f8fc;
64 background:#f0f3fb}
65.spiffy2{
66 margin-left:1px;
67 margin-right:1px;
68 padding-right:1px;
69 padding-left:1px;
70 border-left:1px solid #fdfdfe;
71 border-right:1px solid #fdfdfe;
72 background:#eef2fa}
73.spiffy3{
74 margin-left:1px;
75 margin-right:1px;
76 border-left:1px solid #eef2fa;
77 border-right:1px solid #eef2fa;}
78.spiffy4{
79 border-left:1px solid #f6f8fc;
80 border-right:1px solid #f6f8fc}
81.spiffy5{
82 border-left:1px solid #f0f3fb;
83 border-right:1px solid #f0f3fb}
84.spiffyfg{
85 background:#EBF0FA}
Ted Kremenek8c003042008-04-25 18:44:36 +000086
Ted Kremeneka2de3682008-06-17 06:38:07 +000087.spiffyfg h2 {
88 margin:0px; padding:10px;
89}
90</style>
Ted Kremenek8c003042008-04-25 18:44:36 +000091
Ted Kremeneka2de3682008-06-17 06:38:07 +000092<style type="text/css">
93 #left { float:left; }
94 #left h2 { margin:1px; padding-top:0px; }
95 #right { float:left; margin-left:50px; padding:0px ;}
96 #right h2 { padding:0px; margin:0px; }
97 #wrappedcontent { padding:15px;}
98</style>
Ted Kremenek8c003042008-04-25 18:44:36 +000099
Ted Kremeneka2de3682008-06-17 06:38:07 +0000100<div id="left">
101 <h2>Using the Analyzer</h2>
102 <ul>
103 <li><a href="StaticAnalysisUsage.html#Obtaining">Obtaining the Analyzer</a></li>
104 <li><a href="StaticAnalysisUsage.html#BasicUsage">Basic Usage</a></li>
105 <li><a href="StaticAnalysisUsage.html#Output">Output of the Analyzer</a></li>
106 <li><a href="StaticAnalysisUsage.html#RecommendedUsageGuidelines">Recommended Usage Guidelines</a></li>
107 <li><a href="StaticAnalysisUsage.html#Debugging">Debugging the Analyzer</a></li>
Ted Kremenek6f419dc2008-07-08 21:25:35 +0000108 <li><a href="StaticAnalysisUsage.html#filingbugs">Filing Bugs and Feature Requests</a></li>
Ted Kremeneka2de3682008-06-17 06:38:07 +0000109 </ul>
110</div>
Ted Kremenek8c003042008-04-25 18:44:36 +0000111
Ted Kremeneka2de3682008-06-17 06:38:07 +0000112<div id="right">
113 <b class="spiffy">
114 <b class="spiffy1"><b></b></b>
115 <b class="spiffy2"><b></b></b>
116 <b class="spiffy3"></b>
117 <b class="spiffy4"></b>
118 <b class="spiffy5"></b></b>
Ted Kremenek8c003042008-04-25 18:44:36 +0000119
Ted Kremeneka2de3682008-06-17 06:38:07 +0000120 <div class="spiffyfg">
121 <div id="wrappedcontent">
122 <h2>Download</h2>
123 <ul>
124 <li>Mac OS X (Intel-only, 10.5+):
Ted Kremenek73855992008-06-17 06:43:11 +0000125 <p>
126 <!--#include virtual="latest_checker.html.incl"-->
127 </p>
128 </li>
Ted Kremeneka2de3682008-06-17 06:38:07 +0000129 <li><a href="StaticAnalysisUsage.html#OtherUsage">Other Platforms</a> (Building from Source)</li>
130 </div>
131
132 </div>
Ted Kremenek8c003042008-04-25 18:44:36 +0000133
Ted Kremeneka2de3682008-06-17 06:38:07 +0000134 <b class="spiffy">
135 <b class="spiffy5"></b>
136 <b class="spiffy4"></b>
137 <b class="spiffy3"></b>
138 <b class="spiffy2"><b></b></b>
139 <b class="spiffy1"><b></b></b></b>
140</div>
Ted Kremenek1a30cfd2008-06-12 18:39:02 +0000141
Ted Kremenek79310de2008-06-11 05:25:12 +0000142
Ted Kremenek34423882008-06-11 05:26:52 +0000143</div>
Ted Kremenek79310de2008-06-11 05:25:12 +0000144</body>
Ted Kremeneka2de3682008-06-17 06:38:07 +0000145</html>
146