ΒΆCXString clang_formatDiagnostic(
    CXDiagnostic Diagnostic,
    unsigned int Options)

Description

Format the given diagnostic in a manner that is suitable for display. This routine will format the given diagnostic to a string, rendering the diagnostic according to the various options given. The\c clang_defaultDiagnosticDisplayOptions() function returns the set of options that most closely mimics the behavior of the clang compiler.

Declared at: clang/include/clang-c/Index.h:972

Parameters

CXDiagnostic Diagnostic
The diagnostic to print.
unsigned int Options
A set of options that control the diagnostic display, created by combining \c CXDiagnosticDisplayOptions values.

Returns

A new string containing for formatted diagnostic.