#include "clang/Basic/DiagnosticIDs.h"
#include "clang/Basic/AllDiagnostics.h"
#include "clang/Basic/DiagnosticCategories.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/SourceManager.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringTable.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/ErrorHandling.h"
#include <map>
#include <optional>
#include "clang/Basic/DiagnosticStableIDs.inc"
#include "clang/Basic/AllDiagnosticKinds.inc"
#include "clang/Basic/DiagnosticCommonKinds.inc"
#include "clang/Basic/DiagnosticDriverKinds.inc"
#include "clang/Basic/DiagnosticFrontendKinds.inc"
#include "clang/Basic/DiagnosticCodeGenKinds.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/DiagnosticInstallAPIKinds.inc"
#include "clang/Basic/DiagnosticTrapKinds.inc"
#include "clang/Basic/DiagnosticGroups.inc"
#include "clang/Basic/DiagnosticAllCompatIDs.inc"
Go to the source code of this file.
|
| namespace | clang |
| | Top level wrappers for InstallAPI frontend operations.
|
| namespace | clang::diag |
|
| #define | GET_DIAG_STABLE_ID_ARRAYS |
| #define | DIAG(ENUM, CLASS, DEFAULT_SEVERITY, DESC, GROUP, SFINAE, NOWERROR, SHOWINSYSHEADER, SHOWINSYSMACRO, DEFERRABLE, CATEGORY, STABLE_ID, LEGACY_STABLE_IDS) |
| #define | DIAG(ENUM, CLASS, DEFAULT_SEVERITY, DESC, GROUP, SFINAE, NOWERROR, SHOWINSYSHEADER, SHOWINSYSMACRO, DEFERRABLE, CATEGORY, STABLE_ID, LEGACY_STABLE_IDS) |
| #define | BEGIN_TWO_BYTE_PACK() |
| #define | END_TWO_BYTE_PACK() |
| #define | STRINGIFY_NAME(NAME) |
| #define | VALIDATE_DIAG_SIZE(NAME) |
| #define | DIAG(ENUM, CLASS, DEFAULT_SEVERITY, DESC, GROUP, SFINAE, NOWERROR, SHOWINSYSHEADER, SHOWINSYSMACRO, DEFERRABLE, CATEGORY, STABLE_ID, LEGACY_STABLE_IDS) |
| #define | CATEGORY(NAME, PREV) |
| #define | GET_CATEGORY_TABLE |
| #define | CATEGORY(X, ENUM) |
| #define | GET_DIAG_ARRAYS |
| #define | DIAG_ENTRY(GroupName, FlagNameOffset, Members, SubGroups, Docs) |
| #define | DIAG_COMPAT_IDS_BEGIN() |
| #define | DIAG_COMPAT_IDS_END() |
| #define | DIAG_COMPAT_ID(Value, Name, Std, Diag, DiagPre) |
◆ BEGIN_TWO_BYTE_PACK
| #define BEGIN_TWO_BYTE_PACK |
( |
| ) |
|
◆ 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 ) |
Value:
#define STR_SIZE(str, fieldTy)
◆ DIAG [1/3]
| #define DIAG |
( |
| ENUM, |
|
|
| CLASS, |
|
|
| DEFAULT_SEVERITY, |
|
|
| DESC, |
|
|
| GROUP, |
|
|
| SFINAE, |
|
|
| NOWERROR, |
|
|
| SHOWINSYSHEADER, |
|
|
| SHOWINSYSMACRO, |
|
|
| DEFERRABLE, |
|
|
| CATEGORY, |
|
|
| STABLE_ID, |
|
|
| LEGACY_STABLE_IDS ) |
◆ DIAG [2/3]
| #define DIAG |
( |
| ENUM, |
|
|
| CLASS, |
|
|
| DEFAULT_SEVERITY, |
|
|
| DESC, |
|
|
| GROUP, |
|
|
| SFINAE, |
|
|
| NOWERROR, |
|
|
| SHOWINSYSHEADER, |
|
|
| SHOWINSYSMACRO, |
|
|
| DEFERRABLE, |
|
|
| CATEGORY, |
|
|
| STABLE_ID, |
|
|
| LEGACY_STABLE_IDS ) |
◆ DIAG [3/3]
| #define DIAG |
( |
| ENUM, |
|
|
| CLASS, |
|
|
| DEFAULT_SEVERITY, |
|
|
| DESC, |
|
|
| GROUP, |
|
|
| SFINAE, |
|
|
| NOWERROR, |
|
|
| SHOWINSYSHEADER, |
|
|
| SHOWINSYSMACRO, |
|
|
| DEFERRABLE, |
|
|
| CATEGORY, |
|
|
| STABLE_ID, |
|
|
| LEGACY_STABLE_IDS ) |
Value: { \
diag::ENUM, \
DEFAULT_SEVERITY, \
CLASS, \
DiagnosticIDs::SFINAE, \
NOWERROR, \
SHOWINSYSHEADER, \
SHOWINSYSMACRO, \
GROUP, \
DEFERRABLE, \
uint16_t(DIAG_DESC_OFFSET_##
ENUM), \
uint16_t(DIAG_DESC_OFFSET_##
ENUM >> 16), \
STR_SIZE(DESC, uint16_t)},
#define CATEGORY(X, ENUM)
◆ DIAG_COMPAT_ID
| #define DIAG_COMPAT_ID |
( |
| Value, |
|
|
| Name, |
|
|
| Std, |
|
|
| Diag, |
|
|
| DiagPre ) |
Value: {Std >= 98 ? 1900 + Std : 2000 + Std, diag::Diag, diag::DiagPre},
◆ DIAG_COMPAT_IDS_BEGIN
| #define DIAG_COMPAT_IDS_BEGIN |
( |
| ) |
|
◆ DIAG_COMPAT_IDS_END
| #define DIAG_COMPAT_IDS_END |
( |
| ) |
|
◆ DIAG_ENTRY
| #define DIAG_ENTRY |
( |
| GroupName, |
|
|
| FlagNameOffset, |
|
|
| Members, |
|
|
| SubGroups, |
|
|
| Docs ) |
Value: {FlagNameOffset, Members, SubGroups, Docs},
◆ END_TWO_BYTE_PACK
| #define END_TWO_BYTE_PACK |
( |
| ) |
|
◆ GET_CATEGORY_TABLE
| #define GET_CATEGORY_TABLE |
◆ GET_DIAG_ARRAYS
◆ GET_DIAG_STABLE_ID_ARRAYS
| #define GET_DIAG_STABLE_ID_ARRAYS |
◆ STRINGIFY_NAME
| #define STRINGIFY_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), \
STRINGIFY_NAME( \
DIAG_SIZE_##NAME) " is insufficient to contain all " \
"diagnostics, it may need to be made larger in " \
"DiagnosticIDs.h.");
Definition at line 153 of file DiagnosticIDs.cpp.
◆ forEachSubGroup()
◆ forEachSubGroupImpl()
template<class Func>
| void forEachSubGroupImpl |
( |
const WarningOption * | Group, |
|
|
Func | func ) |
|
static |
◆ GetDiagInfo()
| 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 224 of file DiagnosticIDs.cpp.
References CATEGORY, COMMENT, clang::Found, and StaticDiagInfoSize.
Referenced by clang::DiagnosticIDs::getCategoryNumberForDiag(), clang::DiagnosticIDs::getDefaultMapping(), clang::DiagnosticIDs::getDescription(), clang::DiagnosticIDs::getDiagnosticSFINAEResponse(), getDiagnosticsInGroup(), clang::DiagnosticIDs::getGroupForDiag(), clang::DiagnosticIDs::getLegacyStableIDs(), clang::DiagnosticIDs::getStableID(), clang::DiagnosticIDs::isDeferrable(), and clang::DiagnosticIDs::shouldSuppressAsSystemWarning().
◆ getDiagnosticsInGroup()
◆ toLevel()
◆ CategoryNameTable
| const StaticDiagCategoryRec CategoryNameTable[] |
|
static |
◆ OptionTable
| const WarningOption OptionTable[] |
|
static |
Initial value:= {
#define DIAG_ENTRY(GroupName, FlagNameOffset, Members, SubGroups, Docs) \
}
Definition at line 723 of file DiagnosticIDs.cpp.
Referenced by forEachSubGroup(), forEachSubGroupImpl(), clang::DiagnosticIDs::getDiagnosticsInGroup(), getDiagnosticsInGroup(), clang::DiagnosticIDs::getGroupForWarningOption(), clang::DiagnosticIDs::getNearestOption(), clang::DiagnosticIDs::getWarningOptionDocumentation(), and clang::DiagnosticIDs::getWarningOptionForGroup().
◆ StaticDiagInfoSize
| const unsigned StaticDiagInfoSize = std::size(StaticDiagInfo) |
|
static |