clang 20.0.0git
|
The streaming interface shared between DiagnosticBuilder and PartialDiagnostic. More...
#include "clang/Basic/Diagnostic.h"
Public Types | |
using | DiagStorageAllocator = clang::DiagStorageAllocator |
Public Member Functions | |
DiagnosticStorage * | getStorage () const |
Retrieve storage for this particular diagnostic. | |
void | freeStorage () |
void | freeStorageSlow () |
void | AddTaggedVal (uint64_t V, DiagnosticsEngine::ArgumentKind Kind) const |
void | AddString (StringRef V) const |
void | AddSourceRange (const CharSourceRange &R) const |
void | AddFixItHint (const FixItHint &Hint) const |
operator bool () const | |
Conversion of StreamingDiagnostic to bool always returns true . | |
Protected Member Functions | |
StreamingDiagnostic ()=default | |
StreamingDiagnostic (DiagStorageAllocator &Alloc) | |
Construct with a storage allocator which will manage the storage. | |
StreamingDiagnostic (const StreamingDiagnostic &Diag)=default | |
StreamingDiagnostic (StreamingDiagnostic &&Diag)=default | |
~StreamingDiagnostic () | |
Protected Attributes | |
DiagnosticStorage * | DiagStorage = nullptr |
DiagStorageAllocator * | Allocator = nullptr |
Allocator used to allocate storage for this diagnostic. | |
The streaming interface shared between DiagnosticBuilder and PartialDiagnostic.
This class is not intended to be constructed directly but only as base class of DiagnosticBuilder and PartialDiagnostic builder.
Any new type of argument accepted by DiagnosticBuilder and PartialDiagnostic should be implemented as a '<<' operator of StreamingDiagnostic, e.g.
const StreamingDiagnostic& operator<<(const StreamingDiagnostic&, NewArgType);
Definition at line 1102 of file Diagnostic.h.
Definition at line 1104 of file Diagnostic.h.
|
protecteddefault |
|
inlineexplicitprotected |
Construct with a storage allocator which will manage the storage.
The allocator is not a null pointer in this case.
Definition at line 1195 of file Diagnostic.h.
|
protecteddefault |
|
protecteddefault |
|
inlineprotected |
Definition at line 1201 of file Diagnostic.h.
References freeStorage().
|
inline |
Definition at line 1171 of file Diagnostic.h.
References DiagStorage, clang::DiagnosticStorage::FixItHints, getStorage(), and clang::FixItHint::isNull().
Referenced by clang::PartialDiagnostic::Emit(), clang::operator<<(), and clang::PartialDiagnostic::PartialDiagnostic().
|
inline |
Definition at line 1164 of file Diagnostic.h.
References clang::DiagnosticStorage::DiagRanges, DiagStorage, and getStorage().
Referenced by clang::PartialDiagnostic::Emit(), clang::operator<<(), and clang::PartialDiagnostic::PartialDiagnostic().
|
inline |
Definition at line 1153 of file Diagnostic.h.
References clang::DiagnosticsEngine::ak_std_string, clang::DiagnosticStorage::DiagArgumentsKind, clang::DiagnosticStorage::DiagArgumentsStr, DiagStorage, getStorage(), clang::DiagnosticStorage::MaxArguments, clang::DiagnosticStorage::NumDiagArgs, and V.
Referenced by addConstraintSatisfaction(), clang::BackendConsumer::DiagnosticHandlerImpl(), clang::PartialDiagnostic::Emit(), clang::BackendConsumer::InlineAsmDiagHandler(), llvm::MachO::operator<<(), clang::operator<<(), clang::PartialDiagnostic::PartialDiagnostic(), and clang::BackendConsumer::SrcMgrDiagHandler().
|
inline |
Definition at line 1143 of file Diagnostic.h.
References clang::DiagnosticStorage::DiagArgumentsKind, clang::DiagnosticStorage::DiagArgumentsVal, DiagStorage, getStorage(), Kind, clang::DiagnosticStorage::MaxArguments, clang::DiagnosticStorage::NumDiagArgs, and V.
Referenced by clang::PartialDiagnostic::Emit(), clang::operator<<(), and clang::PartialDiagnostic::PartialDiagnostic().
|
inline |
Definition at line 1123 of file Diagnostic.h.
References DiagStorage, and freeStorageSlow().
Referenced by clang::PartialDiagnostic::operator=(), clang::PartialDiagnostic::Reset(), and ~StreamingDiagnostic().
|
inline |
Definition at line 1136 of file Diagnostic.h.
References Allocator, clang::DiagStorageAllocator::Deallocate(), and DiagStorage.
Referenced by freeStorage().
|
inline |
Retrieve storage for this particular diagnostic.
Definition at line 1114 of file Diagnostic.h.
References clang::DiagStorageAllocator::Allocate(), Allocator, and DiagStorage.
Referenced by AddFixItHint(), AddSourceRange(), AddString(), AddTaggedVal(), clang::PartialDiagnostic::operator=(), and clang::PartialDiagnostic::PartialDiagnostic().
|
inline |
Conversion of StreamingDiagnostic to bool always returns true
.
This allows is to be used in boolean error contexts (where true
is used to indicate that an error has occurred), like:
Definition at line 1188 of file Diagnostic.h.
|
protected |
Allocator used to allocate storage for this diagnostic.
Definition at line 1110 of file Diagnostic.h.
Referenced by clang::DiagnosticBuilder::DiagnosticBuilder(), freeStorageSlow(), getStorage(), clang::PartialDiagnostic::operator=(), clang::PartialDiagnostic::PartialDiagnostic(), and clang::PartialDiagnostic::swap().
|
mutableprotected |
Definition at line 1107 of file Diagnostic.h.
Referenced by AddFixItHint(), AddSourceRange(), AddString(), AddTaggedVal(), clang::DiagnosticBuilder::DiagnosticBuilder(), clang::PartialDiagnostic::Emit(), freeStorage(), freeStorageSlow(), getStorage(), clang::PartialDiagnostic::getStringArg(), clang::PartialDiagnostic::hasStorage(), clang::PartialDiagnostic::operator=(), clang::PartialDiagnostic::PartialDiagnostic(), and clang::PartialDiagnostic::swap().