|
clang 23.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 1124 of file Diagnostic.h.
Definition at line 1126 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 1217 of file Diagnostic.h.
References Allocator.
|
protecteddefault |
References Diag(), and StreamingDiagnostic().
|
protecteddefault |
References Diag(), and StreamingDiagnostic().
|
inlineprotected |
Definition at line 1223 of file Diagnostic.h.
References freeStorage().
|
inline |
Definition at line 1193 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 1186 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 1175 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<<(), 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 1165 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 1145 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 1158 of file Diagnostic.h.
References Allocator, and DiagStorage.
Referenced by freeStorage().
|
inline |
Retrieve storage for this particular diagnostic.
Definition at line 1136 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 1210 of file Diagnostic.h.
|
protected |
Allocator used to allocate storage for this diagnostic.
Definition at line 1132 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 1129 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().