CXDiagnosticDisplayOptions

\brief Options to control the display of diagnostics.

The values in this enum are meant to be combined to customize the behavior of \c clang_formatDiagnostic().

Values

ValueMeaning
CXDiagnostic_DisplaySourceLocation0x01

\brief Display the source-location information where the diagnostic was located.

When set, diagnostics will be prefixed by the file, line, and (optionally) column to which the diagnostic refers. For example,

\code test.c:28: warning: extra tokens at end of #endif directive \endcode

This option corresponds to the clang flag \c -fshow-source-location.

CXDiagnostic_DisplayColumn0x02

\brief If displaying the source-location information of the diagnostic, also include the column number.

This option corresponds to the clang flag \c -fshow-column.

CXDiagnostic_DisplaySourceRanges0x04

\brief If displaying the source-location information of the diagnostic, also include information about source ranges in a machine-parsable format.

This option corresponds to the clang flag \c -fdiagnostics-print-source-range-info.

CXDiagnostic_DisplayOption0x08

\brief Display the option name associated with this diagnostic, if any.

The option name displayed (e.g., -Wconversion) will be placed in brackets after the diagnostic text. This option corresponds to the clang flag \c -fdiagnostics-show-option.

CXDiagnostic_DisplayCategoryId0x10

\brief Display the category number associated with this diagnostic, if any.

The category number is displayed within brackets after the diagnostic text. This option corresponds to the clang flag \c -fdiagnostics-show-category=id.

CXDiagnostic_DisplayCategoryName0x20

\brief Display the category name associated with this diagnostic, if any.

The category name is displayed within brackets after the diagnostic text. This option corresponds to the clang flag \c -fdiagnostics-show-category=name.

Meta