summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2010-05-27 15:17:06 +0000
committerrdivacky <rdivacky@FreeBSD.org>2010-05-27 15:17:06 +0000
commit53992adde3eda3ccf9da63bc7e45673f043de18f (patch)
tree3558f327a6f9ab59c5d7a06528d84e1560445247 /docs
parent7e411337c0ed226dace6e07f1420486768161308 (diff)
downloadFreeBSD-src-53992adde3eda3ccf9da63bc7e45673f043de18f.zip
FreeBSD-src-53992adde3eda3ccf9da63bc7e45673f043de18f.tar.gz
Update clang to r104832.
Diffstat (limited to 'docs')
-rw-r--r--docs/InternalsManual.html12
-rw-r--r--docs/UsersManual.html48
-rw-r--r--docs/tools/clang.pod25
3 files changed, 72 insertions, 13 deletions
diff --git a/docs/InternalsManual.html b/docs/InternalsManual.html
index daec6b0..5ef5dd8 100644
--- a/docs/InternalsManual.html
+++ b/docs/InternalsManual.html
@@ -532,12 +532,12 @@ source code of the program. Important design points include:</p>
</ol>
<p>In practice, the SourceLocation works together with the SourceManager class
-to encode two pieces of information about a location: it's spelling location
-and it's instantiation location. For most tokens, these will be the same. However,
-for a macro expansion (or tokens that came from a _Pragma directive) these will
-describe the location of the characters corresponding to the token and the
-location where the token was used (i.e. the macro instantiation point or the
-location of the _Pragma itself).</p>
+to encode two pieces of information about a location: its spelling location
+and its instantiation location. For most tokens, these will be the same.
+However, for a macro expansion (or tokens that came from a _Pragma directive)
+these will describe the location of the characters corresponding to the token
+and the location where the token was used (i.e. the macro instantiation point
+or the location of the _Pragma itself).</p>
<p>The Clang front-end inherently depends on the location of a token being
tracked correctly. If it is ever incorrect, the front-end may get confused and
diff --git a/docs/UsersManual.html b/docs/UsersManual.html
index 7d7f263..5c5f6f9 100644
--- a/docs/UsersManual.html
+++ b/docs/UsersManual.html
@@ -36,6 +36,7 @@ td {
<ul>
<li><a href="#diagnostics_display">Controlling How Clang Displays Diagnostics</a></li>
<li><a href="#diagnostics_mappings">Diagnostic Mappings</a></li>
+ <li><a href="#diagnostics_categories">Diagnostic Categories</a><li>
<li><a href="#diagnostics_commandline">Controlling Diagnostics via Command Line Flags</a></li>
<li><a href="#diagnostics_pragmas">Controlling Diagnostics via Pragmas</a></li>
</ul>
@@ -286,6 +287,30 @@ diagnostic. This information tells you the flag needed to enable or disable the
diagnostic, either from the command line or through <a
href="#pragma_GCC_diagnostic">#pragma GCC diagnostic</a>.</dd>
+<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+<dt id="opt_fdiagnostics-show-category"><b>-fdiagnostics-show-category=none/id/name</b>:
+Enable printing category information in diagnostic line.</dt>
+<dd>This option, which defaults to "none",
+controls whether or not Clang prints the category associated with a diagnostic
+when emitting it. Each diagnostic may or many not have an associated category,
+if it has one, it is listed in the diagnostic categorization field of the
+diagnostic line (in the []'s).</p>
+
+<p>For example, a format string warning will produce these three renditions
+based on the setting of this option:</p>
+
+<pre>
+ t.c:3:11: warning: conversion specifies type 'char *' but the argument has type 'int' [-Wformat]
+ t.c:3:11: warning: conversion specifies type 'char *' but the argument has type 'int' [-Wformat<b>,1</b>]
+ t.c:3:11: warning: conversion specifies type 'char *' but the argument has type 'int' [-Wformat<b>,Format String</b>]
+</pre>
+
+<p>This category can be used by clients that want to group diagnostics by
+category, so it should be a high level category. We want dozens of these, not
+hundreds or thousands of them.</p>
+</dd>
+
+
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<dt id="opt_fdiagnostics-fixit-info"><b>-f[no-]diagnostics-fixit-info</b>:
@@ -393,6 +418,10 @@ it:</p>
<li>An option that indicates how to control the diagnostic (for diagnostics that
support it) [<a
href="#opt_fdiagnostics-show-option">-fdiagnostics-show-option</a>].</li>
+<li>A <a href="#diagnostics_categories">high-level category</a> for the
+ diagnostic for clients that want to group diagnostics by class (for
+ diagnostics that support it) [<a
+ href="#opt_fdiagnostics-show-category">-fdiagnostics-show-category</a>].</li>
<li>The line of source code that the issue occurs on, along with a caret and
ranges that indicate the important locations [<a
href="opt_fcaret-diagnostics">-fcaret-diagnostics</a>].</li>
@@ -407,6 +436,7 @@ it:</p>
<p>For more information please see <a href="#cl_diag_formatting">Formatting of
Diagnostics</a>.</p>
+
<h4 id="diagnostics_mappings">Diagnostic Mappings</h4>
<p>All diagnostics are mapped into one of these 5 classes:</p>
@@ -420,7 +450,23 @@ Diagnostics</a>.</p>
<li>Fatal</li>
</ul></p>
-<h4 id="diagnostics_commandline">Controlling Diagnostics via Command Line Flags</h4>
+<h4 id="diagnostics_categories">Diagnostic Categories</h4>
+
+<p>Though not shown by default, diagnostics may each be associated with a
+ high-level category. This category is intended to make it possible to triage
+ builds that produce a large number of errors or warnings in a grouped way.
+</p>
+
+<p>Categories are not shown by default, but they can be turned on with the
+<a href="#opt_fdiagnostics-show-category">-fdiagnostics-show-category</a> option.
+When set to "<tt>name</tt>", the category is printed textually in the diagnostic
+output. When it is set to "<tt>id</tt>", a category number is printed. The
+mapping of category names to category id's can be obtained by running '<tt>clang
+ --print-diagnostic-categories</tt>'.
+</p>
+
+<h4 id="diagnostics_commandline">Controlling Diagnostics via Command Line
+ Flags</h4>
<p>-W flags, -pedantic, etc</p>
diff --git a/docs/tools/clang.pod b/docs/tools/clang.pod
index 42cf8fa..0c1ab57 100644
--- a/docs/tools/clang.pod
+++ b/docs/tools/clang.pod
@@ -50,10 +50,13 @@ parse errors. The output of this stage is an "Abstract Syntax Tree" (AST).
=item B<Code Generation and Optimization>
This stage translates an AST into low-level intermediate code (known as "LLVM
-IR") and ultimately to machine code (depending on the optimization level). This
-phase is responsible for optimizing the generated code and handling
-target-specfic code generation. The output of this stage is typically called a
-".s" file or "assembly" file.
+IR") and ultimately to machine code. This phase is responsible for optimizing
+the generated code and handling target-specfic code generation. The output of
+this stage is typically called a ".s" file or "assembly" file.
+
+Clang also supports the use of an integrated assembler, in which the code
+generator produces object files directly. This avoids the overhead of generating
+the ".s" file and of calling the target assembler.
=item B<Assembler>
@@ -325,17 +328,21 @@ Pass I<arg> to the assembler.
=item B<-Xclang> I<arg>
-Pass I<arg> to the clang compiler.
+Pass I<arg> to the clang compiler frontend.
=item B<-Xlinker> I<arg>
Pass I<arg> to the linker.
+=item B<-mllvm> I<arg>
+
+Pass I<arg> to the LLVM backend.
+
=item B<-Xpreprocessor> I<arg>
Pass I<arg> to the preprocessor.
-=item B<-o> I<file>
+=item B<-o> I<file>
Write output to I<file>.
@@ -359,6 +366,12 @@ Print the paths used for finding libraries and programs.
Save intermediate compilation results.
+=item B<-integrated-as> B<-no-integrated-as>
+
+Used to enable and disable, respectively, the use of the integrated
+assembler. Whether the integrated assembler is on by default is target
+dependent.
+
=item B<-time>
Time individual commands.
OpenPOWER on IntegriCloud