#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/DiagnosticCrossTUKinds.inc"
#include "clang/Basic/DiagnosticSemaKinds.inc"
#include "clang/Basic/DiagnosticAnalysisKinds.inc"
#include "clang/Basic/DiagnosticRefactoringKinds.inc"
#include "clang/Basic/DiagnosticGroups.inc"
Go to the source code of this file.
|
#define | STRINGIFY_NAME(NAME) #NAME |
|
#define | VALIDATE_DIAG_SIZE(NAME) |
|
#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 |
|
◆ CATEGORY [1/2]
#define CATEGORY |
( |
|
NAME, |
|
|
|
PREV |
|
) |
| |
Value:if (DiagID > DIAG_START_##NAME) { \
Offset += NUM_BUILTIN_##PREV##_DIAGNOSTICS - DIAG_START_##PREV - 1; \
ID -= DIAG_START_##NAME - DIAG_START_##PREV; \
}
Referenced by GetDiagInfo().
◆ CATEGORY [2/2]
#define CATEGORY |
( |
|
X, |
|
|
|
ENUM |
|
) |
| { X, STR_SIZE(X, uint8_t) }, |
◆ DIAG
#define DIAG |
( |
|
ENUM, |
|
|
|
CLASS, |
|
|
|
DEFAULT_SEVERITY, |
|
|
|
DESC, |
|
|
|
GROUP, |
|
|
|
SFINAE, |
|
|
|
NOWERROR, |
|
|
|
SHOWINSYSHEADER, |
|
|
|
CATEGORY |
|
) |
| |
Value:{ \
diag::ENUM, DEFAULT_SEVERITY, CLASS, DiagnosticIDs::SFINAE, NOWERROR, \
} \
,
#define CATEGORY(NAME, PREV)
#define STR_SIZE(str, fieldTy)
◆ GET_CATEGORY_TABLE
#define GET_CATEGORY_TABLE |
◆ GET_DIAG_ARRAYS
◆ GET_DIAG_TABLE
◆ STRINGIFY_NAME
#define STRINGIFY_NAME |
( |
|
NAME | ) |
#NAME |
◆ VALIDATE_DIAG_SIZE
#define VALIDATE_DIAG_SIZE |
( |
|
NAME | ) |
|
Value:static_assert( \
static_cast<unsigned>(diag::NUM_BUILTIN_##NAME##_DIAGNOSTICS) < \
static_cast<unsigned>(diag::DIAG_START_##NAME) + \
static_cast<unsigned>(diag::DIAG_SIZE_##NAME), \
DIAG_SIZE_##NAME) " is insufficient to contain all " \
"diagnostics, it may need to be made larger in " \
"DiagnosticIDs.h.");
#define STRINGIFY_NAME(NAME)
Definition at line 72 of file DiagnosticIDs.cpp.
◆ anonymous enum
◆ getBuiltinDiagClass()
static unsigned getBuiltinDiagClass |
( |
unsigned |
DiagID | ) |
|
|
static |
◆ GetDefaultDiagMapping()
◆ GetDiagInfo()
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 124 of file DiagnosticIDs.cpp.
References ANALYSIS, CATEGORY, COMMENT, clang::diag::DIAG_START_COMMON, and clang::diag::DIAG_UPPER_LIMIT.
Referenced by getBuiltinDiagClass(), clang::DiagnosticIDs::getCategoryNumberForDiag(), GetDefaultDiagMapping(), clang::DiagnosticIDs::getDescription(), clang::DiagnosticIDs::getDiagnosticSFINAEResponse(), getDiagnosticsInGroup(), clang::DiagnosticIDs::getWarningOptionForDiag(), and toLevel().
◆ getDiagnosticsInGroup()
◆ toLevel()
Definition at line 382 of file DiagnosticIDs.cpp.
References clang::diag::DIAG_UPPER_LIMIT, clang::diag::Error, clang::DiagnosticIDs::Error, clang::diag::Fatal, clang::DiagnosticIDs::Fatal, getBuiltinDiagClass(), GetDiagInfo(), clang::SourceManager::getExpansionLoc(), clang::DiagnosticMapping::getSeverity(), clang::DiagnosticsEngine::getSourceManager(), clang::DiagnosticMapping::hasNoErrorAsFatal(), clang::DiagnosticMapping::hasNoWarningAsError(), clang::diag::Ignored, clang::DiagnosticIDs::Ignored, clang::SourceManager::isInSystemHeader(), clang::DiagnosticMapping::isUser(), clang::SourceLocation::isValid(), max(), clang::DiagnosticIDs::Note, clang::diag::Remark, clang::DiagnosticIDs::Remark, clang::Result, State, clang::diag::Warning, and clang::DiagnosticIDs::Warning.
◆ CategoryNameTable
const StaticDiagCategoryRec CategoryNameTable[] |
|
static |
Initial value:= {
#define GET_CATEGORY_TABLE
#define CATEGORY(X, ENUM)
{ nullptr, 0 }
}
Definition at line 225 of file DiagnosticIDs.cpp.
◆ OptionTable
const WarningOption OptionTable[] |
|
static |
◆ StaticDiagInfo
const StaticDiagInfoRec StaticDiagInfo[] |
|
static |
Initial value:= {
#define DIAG(ENUM, CLASS, DEFAULT_SEVERITY, DESC, GROUP, SFINAE, NOWERROR, SHOWINSYSHEADER, CATEGORY)
}
Definition at line 97 of file DiagnosticIDs.cpp.
◆ StaticDiagInfoSize
const unsigned StaticDiagInfoSize = llvm::array_lengthof(StaticDiagInfo) |
|
static |