annotate clang/www/analyzer/command-line.html @ 236:c4bab56944e8 llvm-original

LLVM 16
author kono
date Wed, 09 Nov 2022 17:45:10 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
anatofuz
parents:
diff changeset
2 "http://www.w3.org/TR/html4/strict.dtd">
anatofuz
parents:
diff changeset
3 <html>
anatofuz
parents:
diff changeset
4 <head>
anatofuz
parents:
diff changeset
5 <title>Running the analyzer from the command line</title>
anatofuz
parents:
diff changeset
6 <link type="text/css" rel="stylesheet" href="content.css">
anatofuz
parents:
diff changeset
7 <link type="text/css" rel="stylesheet" href="menu.css">
anatofuz
parents:
diff changeset
8 <script type="text/javascript" src="scripts/menu.js"></script>
anatofuz
parents:
diff changeset
9 </head>
anatofuz
parents:
diff changeset
10 <body>
anatofuz
parents:
diff changeset
11
anatofuz
parents:
diff changeset
12 <div id="page">
anatofuz
parents:
diff changeset
13 <!--#include virtual="menu.html.incl"-->
anatofuz
parents:
diff changeset
14 <div id="content">
anatofuz
parents:
diff changeset
15
anatofuz
parents:
diff changeset
16 <h1>Running the analyzer from the command line</h1>
anatofuz
parents:
diff changeset
17
anatofuz
parents:
diff changeset
18 <p> Static Analyzer is by design a GUI tool. Its purpose is to find buggy execution
anatofuz
parents:
diff changeset
19 paths in the program, and such paths are very hard to comprehend by looking at
anatofuz
parents:
diff changeset
20 a non-interactive standard output. It is possible, however, to invoke the
anatofuz
parents:
diff changeset
21 Static Analyzer from the command line in order to obtain analysis results, and
anatofuz
parents:
diff changeset
22 then later view them interactively in a graphical interface. The following
anatofuz
parents:
diff changeset
23 tools are used commonly to run the analyzer from the command line. Both tools
anatofuz
parents:
diff changeset
24 are wrapper scripts to drive the analysis and the underlying invocations of the
anatofuz
parents:
diff changeset
25 Clang compiler:
anatofuz
parents:
diff changeset
26 <ol>
anatofuz
parents:
diff changeset
27 <li><a href="scan-build.html">Scan-Build</a>
anatofuz
parents:
diff changeset
28 is an old and simple command-line tool that emits static analyzer warnings as HTML files while compiling your project. You can view the analysis results in your web browser.
anatofuz
parents:
diff changeset
29 </li>
anatofuz
parents:
diff changeset
30 <ul>
anatofuz
parents:
diff changeset
31 <li>
anatofuz
parents:
diff changeset
32 Useful for individual developers who simply want to view static analysis results at their desk, or in a very simple collaborative environment.
anatofuz
parents:
diff changeset
33 </li>
anatofuz
parents:
diff changeset
34 <li>
anatofuz
parents:
diff changeset
35 Works on all major platforms (Windows, Linux, macOS) and is available as a package in many Linux distributions.
anatofuz
parents:
diff changeset
36 </li>
anatofuz
parents:
diff changeset
37 <li>
anatofuz
parents:
diff changeset
38 Does not include support for cross-translation-unit analysis.
anatofuz
parents:
diff changeset
39 </li>
anatofuz
parents:
diff changeset
40 </ul>
anatofuz
parents:
diff changeset
41 <li><a href="codechecker.html">CodeChecker</a>
anatofuz
parents:
diff changeset
42 is a web server that runs the Static Analyzer on your projects on demand and maintains a database of issues.
anatofuz
parents:
diff changeset
43 </li>
anatofuz
parents:
diff changeset
44 <ul>
anatofuz
parents:
diff changeset
45 <li>
anatofuz
parents:
diff changeset
46 Perfect for managing large amounts of Static Analyzer warnings in a collaborative environment.
anatofuz
parents:
diff changeset
47 </li>
anatofuz
parents:
diff changeset
48 <li>
anatofuz
parents:
diff changeset
49 Generally much more feature-rich than scan-build.
anatofuz
parents:
diff changeset
50 </li>
anatofuz
parents:
diff changeset
51 <li>Supports incremental analysis: Results can be stored in a database, subsequent analysis runs can be compared to list the newly added defects.</li>
anatofuz
parents:
diff changeset
52 <li><a href="https://clang.llvm.org/docs/analyzer/user-docs/CrossTranslationUnit.html">Cross Translation Unit (CTU) analysis</a> is supported fully on Linux via CodeChecker.</li>
anatofuz
parents:
diff changeset
53 <li>Can run clang-tidy checkers too.</li>
anatofuz
parents:
diff changeset
54 <li>Open source, but out-of-tree, i.e. not part of the LLVM project.</li>
anatofuz
parents:
diff changeset
55 </ul>
anatofuz
parents:
diff changeset
56 </ol>
anatofuz
parents:
diff changeset
57 </p>
anatofuz
parents:
diff changeset
58
anatofuz
parents:
diff changeset
59 <p>
anatofuz
parents:
diff changeset
60 </p>
anatofuz
parents:
diff changeset
61 <p>
anatofuz
parents:
diff changeset
62 </p>
anatofuz
parents:
diff changeset
63
anatofuz
parents:
diff changeset
64 </div>
anatofuz
parents:
diff changeset
65 </div>
anatofuz
parents:
diff changeset
66 </body>
anatofuz
parents:
diff changeset
67 </html>