clang 20.0.0git
Typedefs | Enumerations | Functions
CXDiagnostic.h File Reference
#include "clang-c/CXSourceLocation.h"
#include "clang-c/CXString.h"
#include "clang-c/ExternC.h"
#include "clang-c/Platform.h"

Go to the source code of this file.

Typedefs

typedef void * CXDiagnostic
 A single diagnostic, containing the diagnostic's severity, location, text, source ranges, and fix-it hints.
 
typedef void * CXDiagnosticSet
 A group of CXDiagnostics.
 

Enumerations

enum  CXDiagnosticSeverity {
  CXDiagnostic_Ignored = 0 , CXDiagnostic_Note = 1 , CXDiagnostic_Warning = 2 , CXDiagnostic_Error = 3 ,
  CXDiagnostic_Fatal = 4
}
 Describes the severity of a particular diagnostic. More...
 
enum  CXLoadDiag_Error { CXLoadDiag_None = 0 , CXLoadDiag_Unknown = 1 , CXLoadDiag_CannotLoad = 2 , CXLoadDiag_InvalidFile = 3 }
 Describes the kind of error that occurred (if any) in a call to clang_loadDiagnostics. More...
 
enum  CXDiagnosticDisplayOptions {
  CXDiagnostic_DisplaySourceLocation = 0x01 , CXDiagnostic_DisplayColumn = 0x02 , CXDiagnostic_DisplaySourceRanges = 0x04 , CXDiagnostic_DisplayOption = 0x08 ,
  CXDiagnostic_DisplayCategoryId = 0x10 , CXDiagnostic_DisplayCategoryName = 0x20
}
 Options to control the display of diagnostics. More...
 

Functions

CINDEX_LINKAGE unsigned clang_getNumDiagnosticsInSet (CXDiagnosticSet Diags)
 Determine the number of diagnostics in a CXDiagnosticSet.
 
CINDEX_LINKAGE CXDiagnostic clang_getDiagnosticInSet (CXDiagnosticSet Diags, unsigned Index)
 Retrieve a diagnostic associated with the given CXDiagnosticSet.
 
CINDEX_LINKAGE CXDiagnosticSet clang_loadDiagnostics (const char *file, enum CXLoadDiag_Error *error, CXString *errorString)
 Deserialize a set of diagnostics from a Clang diagnostics bitcode file.
 
CINDEX_LINKAGE void clang_disposeDiagnosticSet (CXDiagnosticSet Diags)
 Release a CXDiagnosticSet and all of its contained diagnostics.
 
CINDEX_LINKAGE CXDiagnosticSet clang_getChildDiagnostics (CXDiagnostic D)
 Retrieve the child diagnostics of a CXDiagnostic.
 
CINDEX_LINKAGE void clang_disposeDiagnostic (CXDiagnostic Diagnostic)
 Destroy a diagnostic.
 
CINDEX_LINKAGE CXString clang_formatDiagnostic (CXDiagnostic Diagnostic, unsigned Options)
 Format the given diagnostic in a manner that is suitable for display.
 
CINDEX_LINKAGE unsigned clang_defaultDiagnosticDisplayOptions (void)
 Retrieve the set of display options most similar to the default behavior of the clang compiler.
 
CINDEX_LINKAGE enum CXDiagnosticSeverity clang_getDiagnosticSeverity (CXDiagnostic)
 Determine the severity of the given diagnostic.
 
CINDEX_LINKAGE CXSourceLocation clang_getDiagnosticLocation (CXDiagnostic)
 Retrieve the source location of the given diagnostic.
 
CINDEX_LINKAGE CXString clang_getDiagnosticSpelling (CXDiagnostic)
 Retrieve the text of the given diagnostic.
 
CINDEX_LINKAGE CXString clang_getDiagnosticOption (CXDiagnostic Diag, CXString *Disable)
 Retrieve the name of the command-line option that enabled this diagnostic.
 
CINDEX_LINKAGE unsigned clang_getDiagnosticCategory (CXDiagnostic)
 Retrieve the category number for this diagnostic.
 
CINDEX_DEPRECATED CINDEX_LINKAGE CXString clang_getDiagnosticCategoryName (unsigned Category)
 Retrieve the name of a particular diagnostic category.
 
CINDEX_LINKAGE CXString clang_getDiagnosticCategoryText (CXDiagnostic)
 Retrieve the diagnostic category text for a given diagnostic.
 
CINDEX_LINKAGE unsigned clang_getDiagnosticNumRanges (CXDiagnostic)
 Determine the number of source ranges associated with the given diagnostic.
 
CINDEX_LINKAGE CXSourceRange clang_getDiagnosticRange (CXDiagnostic Diagnostic, unsigned Range)
 Retrieve a source range associated with the diagnostic.
 
CINDEX_LINKAGE unsigned clang_getDiagnosticNumFixIts (CXDiagnostic Diagnostic)
 Determine the number of fix-it hints associated with the given diagnostic.
 
CINDEX_LINKAGE CXString clang_getDiagnosticFixIt (CXDiagnostic Diagnostic, unsigned FixIt, CXSourceRange *ReplacementRange)
 Retrieve the replacement information for a given fix-it.