Ted Kremenek | ce2e332 | 2008-04-25 18:44:36 +0000 | [diff] [blame] | 1 | <html> |
| 2 | <head> |
Ted Kremenek | 92c23cb | 2008-06-17 06:38:07 +0000 | [diff] [blame] | 3 | <title>LLVM/Clang Static Analyzer</title> |
Ted Kremenek | 20c5f14 | 2008-06-11 05:26:52 +0000 | [diff] [blame] | 4 | <link type="text/css" rel="stylesheet" href="menu.css" /> |
| 5 | <link type="text/css" rel="stylesheet" href="content.css" /> |
Ted Kremenek | ce2e332 | 2008-04-25 18:44:36 +0000 | [diff] [blame] | 6 | </head> |
| 7 | <body> |
| 8 | |
Ted Kremenek | 20c5f14 | 2008-06-11 05:26:52 +0000 | [diff] [blame] | 9 | <!--#include virtual="menu.html.incl"--> |
| 10 | |
| 11 | <div id="content"> |
| 12 | |
Ted Kremenek | 92c23cb | 2008-06-17 06:38:07 +0000 | [diff] [blame] | 13 | <h1>LLVM/Clang Static Analyzer</h1> |
Ted Kremenek | ce2e332 | 2008-04-25 18:44:36 +0000 | [diff] [blame] | 14 | |
Ted Kremenek | 92c23cb | 2008-06-17 06:38:07 +0000 | [diff] [blame] | 15 | <p>The LLVM/Clang static analyzer is a standalone tool that find bugs in C and |
| 16 | Objective-C programs. Currently the analyzer is invoked as a command-line tool. |
| 17 | It is intended to run in tandem with a build of a project or code base.</p> |
Ted Kremenek | bc75786 | 2008-06-12 18:39:02 +0000 | [diff] [blame] | 18 | |
| 19 | <p>Here are some important points we ask you to consider when using the static |
| 20 | analyzer:</p> |
| 21 | |
| 22 | <ul> |
| 23 | |
| 24 | <li><b>This tool is <b>very early</b> in development.</b> There are many planned |
| 25 | enhancements to improve both the precision and scope of its analysis algorithms |
| 26 | as well as the kinds bugs it will find.</li> |
| 27 | |
| 28 | <li><b>False positives.</b> Static analysis reasons about the run-time behavior |
| 29 | of a program without actually running the program. Static analysis is not |
| 30 | perfect, and can falsely flag bugs in a program where the code behaves |
| 31 | correctly. Because some code checks performed by the analyzer require more |
| 32 | analysis than others, the frequency of false positives can vary widely between |
| 33 | different checks. Our goal is to have the analyzer have a low false positive |
| 34 | rate for most code on all checks, and we will reach this goal by gradually |
| 35 | improving over time the analysis precision of the tool.</li> |
| 36 | |
| 37 | <li><b>Static analysis can be much slower than compilation.</b> The analyzer |
| 38 | performs a variety of checks on code, each requiring different levels of |
| 39 | analysis precision (more precision = more CPU time). While the analyzer is being |
| 40 | designed to be as fast and light-weight as possible, please do not expect it to |
| 41 | be as fast as compiling a program (even with optimizations enabled). Some of the |
| 42 | algorithms needed to find bugs require in the worst case exponential time. The |
| 43 | analyzer runs in a reasonable amount of time by both bounding the amount of |
| 44 | checking work it will do as well as using clever algorithms to reduce the amount |
| 45 | of work it must do to find bugs.</li> |
| 46 | |
| 47 | </ul> |
Ted Kremenek | b8a522f | 2008-06-11 16:09:34 +0000 | [diff] [blame] | 48 | |
Ted Kremenek | b8a522f | 2008-06-11 16:09:34 +0000 | [diff] [blame] | 49 | |
Ted Kremenek | 92c23cb | 2008-06-17 06:38:07 +0000 | [diff] [blame] | 50 | <!-- Generated from: http://www.spiffycorners.com/index.php --> |
Ted Kremenek | ce2e332 | 2008-04-25 18:44:36 +0000 | [diff] [blame] | 51 | |
Ted Kremenek | 92c23cb | 2008-06-17 06:38:07 +0000 | [diff] [blame] | 52 | <style type="text/css"> |
| 53 | .spiffy{display:block} |
| 54 | .spiffy *{ |
| 55 | display:block; |
| 56 | height:1px; |
| 57 | overflow:hidden; |
| 58 | font-size:.01em; |
| 59 | background:#EBF0FA} |
| 60 | .spiffy1{ |
| 61 | margin-left:3px; |
| 62 | margin-right:3px; |
| 63 | padding-left:1px; |
| 64 | padding-right:1px; |
| 65 | border-left:1px solid #f6f8fc; |
| 66 | border-right:1px solid #f6f8fc; |
| 67 | background:#f0f3fb} |
| 68 | .spiffy2{ |
| 69 | margin-left:1px; |
| 70 | margin-right:1px; |
| 71 | padding-right:1px; |
| 72 | padding-left:1px; |
| 73 | border-left:1px solid #fdfdfe; |
| 74 | border-right:1px solid #fdfdfe; |
| 75 | background:#eef2fa} |
| 76 | .spiffy3{ |
| 77 | margin-left:1px; |
| 78 | margin-right:1px; |
| 79 | border-left:1px solid #eef2fa; |
| 80 | border-right:1px solid #eef2fa;} |
| 81 | .spiffy4{ |
| 82 | border-left:1px solid #f6f8fc; |
| 83 | border-right:1px solid #f6f8fc} |
| 84 | .spiffy5{ |
| 85 | border-left:1px solid #f0f3fb; |
| 86 | border-right:1px solid #f0f3fb} |
| 87 | .spiffyfg{ |
| 88 | background:#EBF0FA} |
Ted Kremenek | ce2e332 | 2008-04-25 18:44:36 +0000 | [diff] [blame] | 89 | |
Ted Kremenek | 92c23cb | 2008-06-17 06:38:07 +0000 | [diff] [blame] | 90 | .spiffyfg h2 { |
| 91 | margin:0px; padding:10px; |
| 92 | } |
| 93 | </style> |
Ted Kremenek | ce2e332 | 2008-04-25 18:44:36 +0000 | [diff] [blame] | 94 | |
Ted Kremenek | 92c23cb | 2008-06-17 06:38:07 +0000 | [diff] [blame] | 95 | <style type="text/css"> |
| 96 | #left { float:left; } |
| 97 | #left h2 { margin:1px; padding-top:0px; } |
| 98 | #right { float:left; margin-left:50px; padding:0px ;} |
| 99 | #right h2 { padding:0px; margin:0px; } |
| 100 | #wrappedcontent { padding:15px;} |
| 101 | </style> |
Ted Kremenek | ce2e332 | 2008-04-25 18:44:36 +0000 | [diff] [blame] | 102 | |
Ted Kremenek | 92c23cb | 2008-06-17 06:38:07 +0000 | [diff] [blame] | 103 | <div id="left"> |
| 104 | <h2>Using the Analyzer</h2> |
| 105 | <ul> |
| 106 | <li><a href="StaticAnalysisUsage.html#Obtaining">Obtaining the Analyzer</a></li> |
| 107 | <li><a href="StaticAnalysisUsage.html#BasicUsage">Basic Usage</a></li> |
| 108 | <li><a href="StaticAnalysisUsage.html#Output">Output of the Analyzer</a></li> |
| 109 | <li><a href="StaticAnalysisUsage.html#RecommendedUsageGuidelines">Recommended Usage Guidelines</a></li> |
| 110 | <li><a href="StaticAnalysisUsage.html#Debugging">Debugging the Analyzer</a></li> |
| 111 | <li><a href="StaticAnalysisUsage.html#filingbugs">Filing Bugs</a></li> |
| 112 | </ul> |
| 113 | </div> |
Ted Kremenek | ce2e332 | 2008-04-25 18:44:36 +0000 | [diff] [blame] | 114 | |
Ted Kremenek | 92c23cb | 2008-06-17 06:38:07 +0000 | [diff] [blame] | 115 | <div id="right"> |
| 116 | <b class="spiffy"> |
| 117 | <b class="spiffy1"><b></b></b> |
| 118 | <b class="spiffy2"><b></b></b> |
| 119 | <b class="spiffy3"></b> |
| 120 | <b class="spiffy4"></b> |
| 121 | <b class="spiffy5"></b></b> |
Ted Kremenek | ce2e332 | 2008-04-25 18:44:36 +0000 | [diff] [blame] | 122 | |
Ted Kremenek | 92c23cb | 2008-06-17 06:38:07 +0000 | [diff] [blame] | 123 | <div class="spiffyfg"> |
| 124 | <div id="wrappedcontent"> |
| 125 | <h2>Download</h2> |
| 126 | <ul> |
| 127 | <li>Mac OS X (Intel-only, 10.5+): |
Ted Kremenek | 34239e9 | 2008-06-17 06:43:11 +0000 | [diff] [blame^] | 128 | <p> |
| 129 | <!--#include virtual="latest_checker.html.incl"--> |
| 130 | </p> |
| 131 | </li> |
Ted Kremenek | 92c23cb | 2008-06-17 06:38:07 +0000 | [diff] [blame] | 132 | <li><a href="StaticAnalysisUsage.html#OtherUsage">Other Platforms</a> (Building from Source)</li> |
| 133 | </div> |
| 134 | |
| 135 | </div> |
Ted Kremenek | ce2e332 | 2008-04-25 18:44:36 +0000 | [diff] [blame] | 136 | |
Ted Kremenek | 92c23cb | 2008-06-17 06:38:07 +0000 | [diff] [blame] | 137 | <b class="spiffy"> |
| 138 | <b class="spiffy5"></b> |
| 139 | <b class="spiffy4"></b> |
| 140 | <b class="spiffy3"></b> |
| 141 | <b class="spiffy2"><b></b></b> |
| 142 | <b class="spiffy1"><b></b></b></b> |
| 143 | </div> |
Ted Kremenek | bc75786 | 2008-06-12 18:39:02 +0000 | [diff] [blame] | 144 | |
Ted Kremenek | be6e516 | 2008-06-11 05:25:12 +0000 | [diff] [blame] | 145 | |
Ted Kremenek | 20c5f14 | 2008-06-11 05:26:52 +0000 | [diff] [blame] | 146 | </div> |
Ted Kremenek | be6e516 | 2008-06-11 05:25:12 +0000 | [diff] [blame] | 147 | </body> |
Ted Kremenek | 92c23cb | 2008-06-17 06:38:07 +0000 | [diff] [blame] | 148 | </html> |
| 149 | |