clang API Documentation
#include "clang/Basic/DiagnosticIDs.h"
#include "clang/Basic/AllDiagnostics.h"
#include "clang/Basic/DiagnosticCategories.h"
#include "clang/Basic/SourceManager.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/ErrorHandling.h"
#include <map>
#include "clang/Basic/DiagnosticCommonKinds.inc"
#include "clang/Basic/DiagnosticDriverKinds.inc"
#include "clang/Basic/DiagnosticFrontendKinds.inc"
#include "clang/Basic/DiagnosticSerializationKinds.inc"
#include "clang/Basic/DiagnosticLexKinds.inc"
#include "clang/Basic/DiagnosticParseKinds.inc"
#include "clang/Basic/DiagnosticASTKinds.inc"
#include "clang/Basic/DiagnosticCommentKinds.inc"
#include "clang/Basic/DiagnosticSemaKinds.inc"
#include "clang/Basic/DiagnosticAnalysisKinds.inc"
#include "clang/Basic/DiagnosticGroups.inc"
Go to the source code of this file.
Classes | |
class | clang::diag::CustomDiagInfo |
Namespaces | |
namespace | clang |
namespace | clang::diag |
Defines | |
#define | DIAG(ENUM, CLASS, DEFAULT_SEVERITY, DESC, GROUP, SFINAE, NOWERROR,SHOWINSYSHEADER, CATEGORY) |
#define | CATEGORY(NAME, PREV) |
#define | GET_CATEGORY_TABLE |
#define | CATEGORY(X, ENUM) { X, STR_SIZE(X, uint8_t) }, |
#define | GET_DIAG_ARRAYS |
#define | GET_DIAG_TABLE |
Enumerations | |
enum | |
Functions | |
static const StaticDiagInfoRec * | GetDiagInfo (unsigned DiagID) |
static DiagnosticMapping | GetDefaultDiagMapping (unsigned DiagID) |
static unsigned | getBuiltinDiagClass (unsigned DiagID) |
static DiagnosticIDs::Level | toLevel (diag::Severity SV) |
static bool | WarningOptionCompare (const WarningOption &LHS, StringRef RHS) |
static bool | getDiagnosticsInGroup (diag::Flavor Flavor, const WarningOption *Group, SmallVectorImpl< diag::kind > &Diags) |
Variables | |
static const StaticDiagInfoRec | StaticDiagInfo [] |
static const unsigned | StaticDiagInfoSize = llvm::array_lengthof(StaticDiagInfo) |
static const StaticDiagCategoryRec | CategoryNameTable [] |
static const WarningOption | OptionTable [] |
static const size_t | OptionTableSize = llvm::array_lengthof(OptionTable) |
#define CATEGORY | ( | NAME, | |
PREV | |||
) |
if (DiagID > DIAG_START_##NAME) { \
Offset += NUM_BUILTIN_##PREV##_DIAGNOSTICS - DIAG_START_##PREV - 1; \
ID -= DIAG_START_##NAME - DIAG_START_##PREV; \
}
#define GET_CATEGORY_TABLE |
#define GET_DIAG_ARRAYS |
Definition at line 484 of file DiagnosticIDs.cpp.
#define GET_DIAG_TABLE |
anonymous enum |
Definition at line 31 of file DiagnosticIDs.cpp.
static unsigned getBuiltinDiagClass | ( | unsigned | DiagID | ) | [static] |
getBuiltinDiagClass - Return the class field of the diagnostic.
Definition at line 246 of file DiagnosticIDs.cpp.
References GetDiagInfo().
Referenced by clang::DiagnosticIDs::isBuiltinExtensionDiag(), clang::DiagnosticIDs::isBuiltinNote(), and clang::DiagnosticIDs::isBuiltinWarningOrExtension().
static DiagnosticMapping GetDefaultDiagMapping | ( | unsigned | DiagID | ) | [static] |
Definition at line 161 of file DiagnosticIDs.cpp.
References clang::diag::Fatal, GetDiagInfo(), clang::DiagnosticMapping::getSeverity(), clang::DiagnosticMapping::Make(), clang::DiagnosticMapping::setNoWarningAsError(), clang::DiagnosticMapping::setSeverity(), and clang::diag::Warning.
Referenced by clang::DiagnosticIDs::isBuiltinExtensionDiag(), and clang::DiagnosticIDs::isDefaultMappingAsError().
static const StaticDiagInfoRec* GetDiagInfo | ( | unsigned | DiagID | ) | [static] |
GetDiagInfo - Return the StaticDiagInfoRec entry for the specified DiagID, or null if the ID is invalid.
Definition at line 98 of file DiagnosticIDs.cpp.
References ANALYSIS, CATEGORY, COMMENT, clang::diag::DIAG_START_COMMON, clang::diag::DIAG_UPPER_LIMIT, StaticDiagInfo, and StaticDiagInfoSize.
Referenced by getBuiltinDiagClass(), clang::DiagnosticIDs::getCategoryNumberForDiag(), GetDefaultDiagMapping(), clang::DiagnosticIDs::getDescription(), clang::DiagnosticIDs::getDiagnosticSFINAEResponse(), getDiagnosticsInGroup(), and clang::DiagnosticIDs::getWarningOptionForDiag().
static bool getDiagnosticsInGroup | ( | diag::Flavor | Flavor, |
const WarningOption * | Group, | ||
SmallVectorImpl< diag::kind > & | Diags | ||
) | [static] |
Return true
if any diagnostics were found in this group, even if they were filtered out due to having the wrong flavor.
Definition at line 525 of file DiagnosticIDs.cpp.
References GetDiagInfo(), and clang::diag::Remark.
static DiagnosticIDs::Level toLevel | ( | diag::Severity | SV | ) | [static] |
Definition at line 370 of file DiagnosticIDs.cpp.
References clang::diag::Error, clang::DiagnosticIDs::Error, clang::diag::Fatal, clang::DiagnosticIDs::Fatal, clang::diag::Ignored, clang::DiagnosticIDs::Ignored, clang::diag::Remark, clang::DiagnosticIDs::Remark, clang::diag::Warning, and clang::DiagnosticIDs::Warning.
static bool WarningOptionCompare | ( | const WarningOption & | LHS, |
StringRef | RHS | ||
) | [static] |
Definition at line 510 of file DiagnosticIDs.cpp.
Referenced by clang::DiagnosticIDs::getDiagnosticsInGroup().
const StaticDiagCategoryRec CategoryNameTable[] [static] |
{ #define GET_CATEGORY_TABLE #define CATEGORY(X, ENUM) { nullptr, 0 } }
Definition at line 213 of file DiagnosticIDs.cpp.
const WarningOption OptionTable[] [static] |
{
#define GET_DIAG_TABLE
}
Definition at line 503 of file DiagnosticIDs.cpp.
const size_t OptionTableSize = llvm::array_lengthof(OptionTable) [static] |
Definition at line 508 of file DiagnosticIDs.cpp.
const StaticDiagInfoRec StaticDiagInfo[] [static] |
{
#define DIAG(ENUM, CLASS, DEFAULT_SEVERITY, DESC, GROUP, SFINAE, NOWERROR, SHOWINSYSHEADER, CATEGORY)
}
Definition at line 73 of file DiagnosticIDs.cpp.
Referenced by clang::DiagnosticIDs::getAllDiagnostics(), and GetDiagInfo().
const unsigned StaticDiagInfoSize = llvm::array_lengthof(StaticDiagInfo) [static] |
Definition at line 94 of file DiagnosticIDs.cpp.
Referenced by clang::DiagnosticIDs::getAllDiagnostics(), and GetDiagInfo().