#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/CharInfo.h"
#include "clang/Basic/DiagnosticError.h"
#include "clang/Basic/DiagnosticIDs.h"
#include "clang/Basic/DiagnosticOptions.h"
#include "clang/Basic/IdentifierTable.h"
#include "clang/Basic/PartialDiagnostic.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/Specifiers.h"
#include "clang/Basic/TokenKinds.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/ConvertUTF.h"
#include "llvm/Support/CrashRecoveryContext.h"
#include "llvm/Support/Unicode.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <limits>
#include <string>
#include <utility>
#include <vector>
usingnamespaceclang;
const StreamingDiagnostic &clang::operator<<(const StreamingDiagnostic &DB,
DiagNullabilityKind nullability) { … }
const StreamingDiagnostic &clang::operator<<(const StreamingDiagnostic &DB,
llvm::Error &&E) { … }
static void DummyArgToStringFn(DiagnosticsEngine::ArgumentKind AK, intptr_t QT,
StringRef Modifier, StringRef Argument,
ArrayRef<DiagnosticsEngine::ArgumentValue> PrevArgs,
SmallVectorImpl<char> &Output,
void *Cookie,
ArrayRef<intptr_t> QualTypeVals) { … }
DiagnosticsEngine::DiagnosticsEngine(
IntrusiveRefCntPtr<DiagnosticIDs> diags,
IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts, DiagnosticConsumer *client,
bool ShouldOwnClient)
: … { … }
DiagnosticsEngine::~DiagnosticsEngine() { … }
void DiagnosticsEngine::dump() const { … }
void DiagnosticsEngine::dump(StringRef DiagName) const { … }
void DiagnosticsEngine::setClient(DiagnosticConsumer *client,
bool ShouldOwnClient) { … }
void DiagnosticsEngine::pushMappings(SourceLocation Loc) { … }
bool DiagnosticsEngine::popMappings(SourceLocation Loc) { … }
void DiagnosticsEngine::Reset(bool soft ) { … }
DiagnosticMapping &
DiagnosticsEngine::DiagState::getOrAddMapping(diag::kind Diag) { … }
void DiagnosticsEngine::DiagStateMap::appendFirst(DiagState *State) { … }
void DiagnosticsEngine::DiagStateMap::append(SourceManager &SrcMgr,
SourceLocation Loc,
DiagState *State) { … }
DiagnosticsEngine::DiagState *
DiagnosticsEngine::DiagStateMap::lookup(SourceManager &SrcMgr,
SourceLocation Loc) const { … }
DiagnosticsEngine::DiagState *
DiagnosticsEngine::DiagStateMap::File::lookup(unsigned Offset) const { … }
DiagnosticsEngine::DiagStateMap::File *
DiagnosticsEngine::DiagStateMap::getFile(SourceManager &SrcMgr,
FileID ID) const { … }
void DiagnosticsEngine::DiagStateMap::dump(SourceManager &SrcMgr,
StringRef DiagName) const { … }
void DiagnosticsEngine::PushDiagStatePoint(DiagState *State,
SourceLocation Loc) { … }
void DiagnosticsEngine::setSeverity(diag::kind Diag, diag::Severity Map,
SourceLocation L) { … }
bool DiagnosticsEngine::setSeverityForGroup(diag::Flavor Flavor,
StringRef Group, diag::Severity Map,
SourceLocation Loc) { … }
bool DiagnosticsEngine::setSeverityForGroup(diag::Flavor Flavor,
diag::Group Group,
diag::Severity Map,
SourceLocation Loc) { … }
bool DiagnosticsEngine::setDiagnosticGroupWarningAsError(StringRef Group,
bool Enabled) { … }
bool DiagnosticsEngine::setDiagnosticGroupErrorAsFatal(StringRef Group,
bool Enabled) { … }
void DiagnosticsEngine::setSeverityForAll(diag::Flavor Flavor,
diag::Severity Map,
SourceLocation Loc) { … }
void DiagnosticsEngine::Report(const StoredDiagnostic &storedDiag) { … }
bool DiagnosticsEngine::EmitDiagnostic(const DiagnosticBuilder &DB,
bool Force) { … }
DiagnosticBuilder::DiagnosticBuilder(DiagnosticsEngine *DiagObj,
SourceLocation DiagLoc, unsigned DiagID)
: … { … }
DiagnosticBuilder::DiagnosticBuilder(const DiagnosticBuilder &D)
: … { … }
Diagnostic::Diagnostic(const DiagnosticsEngine *DO,
const DiagnosticBuilder &DiagBuilder)
: … { … }
Diagnostic::Diagnostic(const DiagnosticsEngine *DO, SourceLocation DiagLoc,
unsigned DiagID, const DiagnosticStorage &DiagStorage,
StringRef StoredDiagMessage)
: … { … }
DiagnosticConsumer::~DiagnosticConsumer() = default;
void DiagnosticConsumer::HandleDiagnostic(DiagnosticsEngine::Level DiagLevel,
const Diagnostic &Info) { … }
template <std::size_t StrLen>
static bool ModifierIs(const char *Modifier, unsigned ModifierLen,
const char (&Str)[StrLen]) { … }
static const char *ScanFormat(const char *I, const char *E, char Target) { … }
static void HandleSelectModifier(const Diagnostic &DInfo, unsigned ValNo,
const char *Argument, unsigned ArgumentLen,
SmallVectorImpl<char> &OutStr) { … }
static void HandleIntegerSModifier(unsigned ValNo,
SmallVectorImpl<char> &OutStr) { … }
static void HandleOrdinalModifier(unsigned ValNo,
SmallVectorImpl<char> &OutStr) { … }
static unsigned PluralNumber(const char *&Start, const char *End) { … }
static bool TestPluralRange(unsigned Val, const char *&Start, const char *End) { … }
static bool EvalPluralExpr(unsigned ValNo, const char *Start, const char *End) { … }
static void HandlePluralModifier(const Diagnostic &DInfo, unsigned ValNo,
const char *Argument, unsigned ArgumentLen,
SmallVectorImpl<char> &OutStr) { … }
static const char *getTokenDescForDiagnostic(tok::TokenKind Kind) { … }
void Diagnostic::
FormatDiagnostic(SmallVectorImpl<char> &OutStr) const { … }
void clang::EscapeStringForDiagnostic(StringRef Str,
SmallVectorImpl<char> &OutStr) { … }
void Diagnostic::
FormatDiagnostic(const char *DiagStr, const char *DiagEnd,
SmallVectorImpl<char> &OutStr) const { … }
StoredDiagnostic::StoredDiagnostic(DiagnosticsEngine::Level Level, unsigned ID,
StringRef Message)
: … { … }
StoredDiagnostic::StoredDiagnostic(DiagnosticsEngine::Level Level,
const Diagnostic &Info)
: … { … }
StoredDiagnostic::StoredDiagnostic(DiagnosticsEngine::Level Level, unsigned ID,
StringRef Message, FullSourceLoc Loc,
ArrayRef<CharSourceRange> Ranges,
ArrayRef<FixItHint> FixIts)
: … { … }
llvm::raw_ostream &clang::operator<<(llvm::raw_ostream &OS,
const StoredDiagnostic &SD) { … }
bool DiagnosticConsumer::IncludeInDiagnosticCounts() const { … }
void IgnoringDiagConsumer::anchor() { … }
ForwardingDiagnosticConsumer::~ForwardingDiagnosticConsumer() = default;
void ForwardingDiagnosticConsumer::HandleDiagnostic(
DiagnosticsEngine::Level DiagLevel,
const Diagnostic &Info) { … }
void ForwardingDiagnosticConsumer::clear() { … }
bool ForwardingDiagnosticConsumer::IncludeInDiagnosticCounts() const { … }
DiagStorageAllocator::DiagStorageAllocator() { … }
DiagStorageAllocator::~DiagStorageAllocator() { … }
char DiagnosticError::ID;