#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 <optional>
usingnamespaceclang;
namespace …
static const unsigned StaticDiagInfoSize = …;
static const StaticDiagInfoRec *GetDiagInfo(unsigned DiagID) { … }
namespace clang {
namespace diag {
CustomDiagDesc;
class CustomDiagInfo { … };
}
}
DiagnosticMapping DiagnosticIDs::getDefaultMapping(unsigned DiagID) const { … }
void DiagnosticIDs::initCustomDiagMapping(DiagnosticMapping &Mapping,
unsigned DiagID) { … }
unsigned DiagnosticIDs::getCategoryNumberForDiag(unsigned DiagID) { … }
namespace {
struct StaticDiagCategoryRec { … };
}
static const StaticDiagCategoryRec CategoryNameTable[] = …;
unsigned DiagnosticIDs::getNumberOfCategories() { … }
StringRef DiagnosticIDs::getCategoryNameFromID(unsigned CategoryID) { … }
DiagnosticIDs::SFINAEResponse
DiagnosticIDs::getDiagnosticSFINAEResponse(unsigned DiagID) { … }
bool DiagnosticIDs::isDeferrable(unsigned DiagID) { … }
DiagnosticIDs::DiagnosticIDs() { … }
DiagnosticIDs::~DiagnosticIDs() { … }
unsigned DiagnosticIDs::getCustomDiagID(CustomDiagDesc Diag) { … }
bool DiagnosticIDs::isWarningOrExtension(unsigned DiagID) const { … }
bool DiagnosticIDs::isNote(unsigned DiagID) const { … }
bool DiagnosticIDs::isExtensionDiag(unsigned DiagID,
bool &EnabledByDefault) const { … }
bool DiagnosticIDs::isDefaultMappingAsError(unsigned DiagID) const { … }
StringRef DiagnosticIDs::getDescription(unsigned DiagID) const { … }
static DiagnosticIDs::Level toLevel(diag::Severity SV) { … }
DiagnosticIDs::Level
DiagnosticIDs::getDiagnosticLevel(unsigned DiagID, SourceLocation Loc,
const DiagnosticsEngine &Diag) const { … }
diag::Severity
DiagnosticIDs::getDiagnosticSeverity(unsigned DiagID, SourceLocation Loc,
const DiagnosticsEngine &Diag) const { … }
DiagnosticIDs::Class DiagnosticIDs::getDiagClass(unsigned DiagID) const { … }
#define GET_DIAG_ARRAYS
#include "clang/Basic/DiagnosticGroups.inc"
#undef GET_DIAG_ARRAYS
namespace {
struct WarningOption { … };
}
static const WarningOption OptionTable[] = …;
StringRef DiagnosticIDs::getWarningOptionDocumentation(diag::Group Group) { … }
StringRef DiagnosticIDs::getWarningOptionForGroup(diag::Group Group) { … }
std::optional<diag::Group>
DiagnosticIDs::getGroupForWarningOption(StringRef Name) { … }
std::optional<diag::Group>
DiagnosticIDs::getGroupForDiag(unsigned DiagID) const { … }
StringRef DiagnosticIDs::getWarningOptionForDiag(unsigned DiagID) { … }
std::vector<std::string> DiagnosticIDs::getDiagnosticFlags() { … }
static bool getDiagnosticsInGroup(diag::Flavor Flavor,
const WarningOption *Group,
SmallVectorImpl<diag::kind> &Diags,
diag::CustomDiagInfo *CustomDiagInfo) { … }
bool
DiagnosticIDs::getDiagnosticsInGroup(diag::Flavor Flavor, StringRef Group,
SmallVectorImpl<diag::kind> &Diags) const { … }
template <class Func>
static void forEachSubGroupImpl(const WarningOption *Group, Func func) { … }
template <class Func>
static void forEachSubGroup(diag::Group Group, Func func) { … }
void DiagnosticIDs::setGroupSeverity(StringRef Group, diag::Severity Sev) { … }
void DiagnosticIDs::setGroupNoWarningsAsError(StringRef Group, bool Val) { … }
void DiagnosticIDs::getAllDiagnostics(diag::Flavor Flavor,
std::vector<diag::kind> &Diags) { … }
StringRef DiagnosticIDs::getNearestOption(diag::Flavor Flavor,
StringRef Group) { … }
bool DiagnosticIDs::ProcessDiag(DiagnosticsEngine &Diag) const { … }
void DiagnosticIDs::EmitDiag(DiagnosticsEngine &Diag, Level DiagLevel) const { … }
bool DiagnosticIDs::isUnrecoverable(unsigned DiagID) const { … }
bool DiagnosticIDs::isARCDiagnostic(unsigned DiagID) { … }
bool DiagnosticIDs::isCodegenABICheckDiagnostic(unsigned DiagID) { … }