forked from OSchip/llvm-project
parent
680fe51e2c
commit
336119f089
|
@ -286,6 +286,30 @@ diagnostic. This information tells you the flag needed to enable or disable the
|
||||||
diagnostic, either from the command line or through <a
|
diagnostic, either from the command line or through <a
|
||||||
href="#pragma_GCC_diagnostic">#pragma GCC diagnostic</a>.</dd>
|
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>:
|
<dt id="opt_fdiagnostics-fixit-info"><b>-f[no-]diagnostics-fixit-info</b>:
|
||||||
|
@ -393,6 +417,10 @@ it:</p>
|
||||||
<li>An option that indicates how to control the diagnostic (for diagnostics that
|
<li>An option that indicates how to control the diagnostic (for diagnostics that
|
||||||
support it) [<a
|
support it) [<a
|
||||||
href="#opt_fdiagnostics-show-option">-fdiagnostics-show-option</a>].</li>
|
href="#opt_fdiagnostics-show-option">-fdiagnostics-show-option</a>].</li>
|
||||||
|
<li>A high-level category 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
|
<li>The line of source code that the issue occurs on, along with a caret and
|
||||||
ranges that indicate the important locations [<a
|
ranges that indicate the important locations [<a
|
||||||
href="opt_fcaret-diagnostics">-fcaret-diagnostics</a>].</li>
|
href="opt_fcaret-diagnostics">-fcaret-diagnostics</a>].</li>
|
||||||
|
|
Loading…
Reference in New Issue