clang 22.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 1115 of file Diagnostic.h.
Definition at line 1117 of file Diagnostic.h.
|
protecteddefault |
Referenced by clang::DiagnosticBuilder::DiagnosticBuilder(), clang::DiagnosticBuilder::DiagnosticBuilder(), clang::DiagnosticBuilder::operator<<(), clang::DiagnosticBuilder::operator<<(), clang::PartialDiagnostic::operator<<(), clang::PartialDiagnostic::operator<<(), clang::PartialDiagnostic::PartialDiagnostic(), clang::PartialDiagnostic::PartialDiagnostic(), StreamingDiagnostic(), and StreamingDiagnostic().
|
inlineexplicitprotected |
Construct with a storage allocator which will manage the storage.
The allocator is not a null pointer in this case.
Definition at line 1208 of file Diagnostic.h.
References Allocator.
|
protecteddefault |
References Diag(), and StreamingDiagnostic().
|
protecteddefault |
References Diag(), and StreamingDiagnostic().
|
inlineprotected |
Definition at line 1214 of file Diagnostic.h.
References freeStorage().
|
inline |
Definition at line 1184 of file Diagnostic.h.
References DiagStorage, getStorage(), and clang::FixItHint::isNull().
Referenced by clang::PartialDiagnostic::Emit(), clang::operator<<(), clang::operator<<(), and clang::PartialDiagnostic::PartialDiagnostic().
|
inline |
Definition at line 1177 of file Diagnostic.h.
References DiagStorage, and getStorage().
Referenced by clang::PartialDiagnostic::Emit(), clang::operator<<(), clang::operator<<(), clang::operator<<(), clang::operator<<(), and clang::PartialDiagnostic::PartialDiagnostic().
|
inline |
Definition at line 1166 of file Diagnostic.h.
References clang::DiagnosticsEngine::ak_std_string, DiagStorage, getStorage(), clang::DiagnosticStorage::MaxArguments, and V.
Referenced by clang::PartialDiagnostic::Emit(), clang::operator<<(), clang::operator<<(), clang::operator<<(), llvm::MachO::operator<<(), llvm::MachO::operator<<(), llvm::MachO::operator<<(), llvm::MachO::operator<<(), llvm::MachO::operator<<(), llvm::MachO::operator<<(), and llvm::MachO::operator<<().
|
inline |
Definition at line 1156 of file Diagnostic.h.
References DiagStorage, getStorage(), clang::DiagnosticStorage::MaxArguments, and V.
Referenced by clang::PartialDiagnostic::Emit(), clang::operator<<(), clang::operator<<(), clang::operator<<(), clang::operator<<(), clang::operator<<(), clang::operator<<(), clang::operator<<(), clang::operator<<(), clang::operator<<(), clang::operator<<(), clang::operator<<(), clang::operator<<(), clang::operator<<(), clang::operator<<(), clang::operator<<(), clang::operator<<(), clang::operator<<(), and clang::operator<<().
|
inline |
Definition at line 1136 of file Diagnostic.h.
References DiagStorage, and freeStorageSlow().
Referenced by clang::PartialDiagnostic::operator=(), clang::PartialDiagnostic::operator=(), clang::PartialDiagnostic::Reset(), and ~StreamingDiagnostic().
|
inline |
Definition at line 1149 of file Diagnostic.h.
References Allocator, and DiagStorage.
Referenced by freeStorage().
|
inline |
Retrieve storage for this particular diagnostic.
Definition at line 1127 of file Diagnostic.h.
References Allocator, and DiagStorage.
Referenced by AddFixItHint(), AddSourceRange(), AddString(), AddTaggedVal(), and clang::PartialDiagnostic::operator=().
|
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 1201 of file Diagnostic.h.
|
protected |
Allocator used to allocate storage for this diagnostic.
Definition at line 1123 of file Diagnostic.h.
Referenced by clang::DiagnosticBuilder::DiagnosticBuilder(), freeStorageSlow(), getStorage(), clang::PartialDiagnostic::operator=(), clang::PartialDiagnostic::PartialDiagnostic(), clang::PartialDiagnostic::PartialDiagnostic(), clang::PartialDiagnostic::PartialDiagnostic(), clang::PartialDiagnostic::PartialDiagnostic(), StreamingDiagnostic(), and clang::PartialDiagnostic::swap().
|
mutableprotected |
Definition at line 1120 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::operator=(), clang::PartialDiagnostic::PartialDiagnostic(), clang::PartialDiagnostic::PartialDiagnostic(), and clang::PartialDiagnostic::swap().