diff options
Diffstat (limited to 'clang/docs')
| -rw-r--r-- | clang/docs/InternalsManual.rst | 11 | ||||
| -rw-r--r-- | clang/docs/UsersManual.rst | 12 |
2 files changed, 14 insertions, 9 deletions
diff --git a/clang/docs/InternalsManual.rst b/clang/docs/InternalsManual.rst index a34ba29c21a..5830a7e5060 100644 --- a/clang/docs/InternalsManual.rst +++ b/clang/docs/InternalsManual.rst @@ -87,7 +87,8 @@ start with ``err_``, ``warn_``, ``ext_`` to encode the severity into the name. Since the enum is referenced in the C++ code that produces the diagnostic, it is somewhat useful for it to be reasonably short. -The severity of the diagnostic comes from the set {``NOTE``, ``WARNING``, +The severity of the diagnostic comes from the set {``NOTE``, ``REMARK``, +``WARNING``, ``EXTENSION``, ``EXTWARN``, ``ERROR``}. The ``ERROR`` severity is used for diagnostics indicating the program is never acceptable under any circumstances. When an error is emitted, the AST for the input code may not be fully built. @@ -97,11 +98,13 @@ represent them in the AST, but we produce diagnostics to tell the user their code is non-portable. The difference is that the former are ignored by default, and the later warn by default. The ``WARNING`` severity is used for constructs that are valid in the currently selected source language but that -are dubious in some way. The ``NOTE`` level is used to staple more information -onto previous diagnostics. +are dubious in some way. The ``REMARK`` severity provides generic information +about the compilation that is not necessarily related to any dubious code. The +``NOTE`` level is used to staple more information onto previous diagnostics. These *severities* are mapped into a smaller set (the ``Diagnostic::Level`` -enum, {``Ignored``, ``Note``, ``Warning``, ``Error``, ``Fatal``}) of output +enum, {``Ignored``, ``Note``, ``Remark``, ``Warning``, ``Error``, ``Fatal``}) of +output *levels* by the diagnostics subsystem based on various configuration options. Clang internally supports a fully fine grained mapping mechanism that allows you to map almost any diagnostic to the output level that you want. The only diff --git a/clang/docs/UsersManual.rst b/clang/docs/UsersManual.rst index 4ca8435c368..ba915018230 100644 --- a/clang/docs/UsersManual.rst +++ b/clang/docs/UsersManual.rst @@ -112,11 +112,11 @@ Options to Control Error and Warning Messages .. option:: -w - Disable all warnings. + Disable all diagnostics. .. option:: -Weverything - :ref:`Enable all warnings. <diagnostics_enable_everything>` + :ref:`Enable all diagnostics. <diagnostics_enable_everything>` .. option:: -pedantic @@ -582,6 +582,7 @@ All diagnostics are mapped into one of these 5 classes: - Ignored - Note +- Remark - Warning - Error - Fatal @@ -722,11 +723,12 @@ is treated as a system header. .. _diagnostics_enable_everything: -Enabling All Warnings -^^^^^^^^^^^^^^^^^^^^^ +Enabling All Diagnostics +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ In addition to the traditional ``-W`` flags, one can enable **all** -warnings by passing :option:`-Weverything`. This works as expected with +diagnostics by passing :option:`-Weverything`. This works as expected +with :option:`-Werror`, and also includes the warnings from :option:`-pedantic`. Note that when combined with :option:`-w` (which disables all warnings), that |

