blob: 04e162089c372085ccc0a36d500e03804d8fb7b3 [file] [log] [blame]
Ted Kremenek940a7382008-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 Kremenek6d2eedd2008-04-25 18:44:36 +00003<html>
4<head>
Ted Kremenek2d93ec72008-06-17 06:38:07 +00005 <title>LLVM/Clang Static Analyzer</title>
Ted Kremenek9b9fe972008-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 Kremenek6d2eedd2008-04-25 18:44:36 +00008</head>
9<body>
10
Ted Kremenek9b9fe972008-06-11 05:26:52 +000011<!--#include virtual="menu.html.incl"-->
12
13<div id="content">
14
Ted Kremenek2d93ec72008-06-17 06:38:07 +000015<h1>LLVM/Clang Static Analyzer</h1>
Ted Kremenek6d2eedd2008-04-25 18:44:36 +000016
Ted Kremenek2d93ec72008-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 Kremenek05e2f602008-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 Kremenekdeba2fb2008-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 Kremenek05e2f602008-06-12 18:39:02 +000035
Ted Kremenekdeba2fb2008-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 Kremenek05e2f602008-06-12 18:39:02 +000043
44</ul>
Ted Kremenek690f46f2008-06-11 16:09:34 +000045
Ted Kremenek690f46f2008-06-11 16:09:34 +000046
Ted Kremenek2d93ec72008-06-17 06:38:07 +000047<!-- Generated from: http://www.spiffycorners.com/index.php -->
Ted Kremenek6d2eedd2008-04-25 18:44:36 +000048
Ted Kremenek2d93ec72008-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 Kremenek6d2eedd2008-04-25 18:44:36 +000086
Ted Kremenek2d93ec72008-06-17 06:38:07 +000087.spiffyfg h2 {
88 margin:0px; padding:10px;
89}
90</style>
Ted Kremenek6d2eedd2008-04-25 18:44:36 +000091
Ted Kremenek2d93ec72008-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 Kremenek6d2eedd2008-04-25 18:44:36 +000099
Ted Kremenek2d93ec72008-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>
108 <li><a href="StaticAnalysisUsage.html#filingbugs">Filing Bugs</a></li>
109 </ul>
110</div>
Ted Kremenek6d2eedd2008-04-25 18:44:36 +0000111
Ted Kremenek2d93ec72008-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 Kremenek6d2eedd2008-04-25 18:44:36 +0000119
Ted Kremenek2d93ec72008-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 Kremenek9eb18aa2008-06-17 06:43:11 +0000125 <p>
126 <!--#include virtual="latest_checker.html.incl"-->
127 </p>
128 </li>
Ted Kremenek2d93ec72008-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 Kremenek6d2eedd2008-04-25 18:44:36 +0000133
Ted Kremenek2d93ec72008-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 Kremenek05e2f602008-06-12 18:39:02 +0000141
Ted Kremenekc2144e72008-06-11 05:25:12 +0000142
Ted Kremenek9b9fe972008-06-11 05:26:52 +0000143</div>
Ted Kremenekc2144e72008-06-11 05:25:12 +0000144</body>
Ted Kremenek2d93ec72008-06-17 06:38:07 +0000145</html>
146