DiagnosticDisplayOptions

public struct DiagnosticDisplayOptions: OptionSet

Options to control the display of diagnostics. The values in this enum are meant to be combined to customize the behavior of clang_formatDiagnostic().

  • Declaration

    Swift

    public let rawValue: RawValue
  • Creates a new DiagnosticDisplayOptions from a raw integer value.

    Declaration

    Swift

    public init(rawValue: RawValue)
  • 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,

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

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

    Declaration

    Swift

    public static let sourceLocation = DiagnosticDisplayOptions(rawValue:
  • If displaying the source-location information of the diagnostic, also include the column number. This option corresponds to the clang flag -fshow-column.

    Declaration

    Swift

    public static let column = DiagnosticDisplayOptions(rawValue:
  • 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 -fdiagnostics-print-source-range-info.

    Declaration

    Swift

    public static let sourceRanges = DiagnosticDisplayOptions(rawValue:
  • 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 -fdiagnostics-show-option.

    Declaration

    Swift

    public static let option = DiagnosticDisplayOptions(rawValue:
  • 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 -fdiagnostics-show-category=id.

    Declaration

    Swift

    public static let categoryId = DiagnosticDisplayOptions(rawValue:
  • 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 -fdiagnostics-show-category=name.

    Declaration

    Swift

    public static let categoryName = DiagnosticDisplayOptions(rawValue: