class StreamingDiagnostic
Declaration
class StreamingDiagnostic { /* full declaration omitted */ };
Description
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);
Declared at: clang/include/clang/Basic/Diagnostic.h:1110
Member Variables
- protected clang::DiagnosticStorage* DiagStorage = nullptr
- protected clang::StreamingDiagnostic::DiagStorageAllocator* Allocator = nullptr
- Allocator used to allocate storage for this diagnostic.
Method Overview
- public void AddFixItHint(const clang::FixItHint & Hint) const
- public void AddSourceRange(const clang::CharSourceRange & R) const
- public void AddString(llvm::StringRef V) const
- public void AddTaggedVal(uint64_t V, DiagnosticsEngine::ArgumentKind Kind) const
- protected StreamingDiagnostic()
- protected StreamingDiagnostic(clang::DiagnosticStorage * Storage)
- protected StreamingDiagnostic(clang::StreamingDiagnostic::DiagStorageAllocator & Alloc)
- protected StreamingDiagnostic(const clang::StreamingDiagnostic & Diag)
- protected StreamingDiagnostic(clang::StreamingDiagnostic && Diag)
- public void freeStorage()
- public void freeStorageSlow()
- public clang::DiagnosticStorage * getStorage() const
- public bool operator bool() const
- protected ~StreamingDiagnostic()
Methods
¶void AddFixItHint(
const clang::FixItHint& Hint) const
void AddFixItHint(
const clang::FixItHint& Hint) const
Declared at: clang/include/clang/Basic/Diagnostic.h:1212
Parameters
- const clang::FixItHint& Hint
¶void AddSourceRange(
const clang::CharSourceRange& R) const
void AddSourceRange(
const clang::CharSourceRange& R) const
Declared at: clang/include/clang/Basic/Diagnostic.h:1205
Parameters
- const clang::CharSourceRange& R
¶void AddString(llvm::StringRef V) const
void AddString(llvm::StringRef V) const
Declared at: clang/include/clang/Basic/Diagnostic.h:1194
Parameters
¶void AddTaggedVal(
uint64_t V,
DiagnosticsEngine::ArgumentKind Kind) const
void AddTaggedVal(
uint64_t V,
DiagnosticsEngine::ArgumentKind Kind) const
Declared at: clang/include/clang/Basic/Diagnostic.h:1184
Parameters
- uint64_t V
- DiagnosticsEngine::ArgumentKind Kind
¶StreamingDiagnostic()
StreamingDiagnostic()
Declared at: clang/include/clang/Basic/Diagnostic.h:1232
¶StreamingDiagnostic(
clang::DiagnosticStorage* Storage)
StreamingDiagnostic(
clang::DiagnosticStorage* Storage)
Description
Construct with an external storage not owned by itself. The allocator is a null pointer in this case.
Declared at: clang/include/clang/Basic/Diagnostic.h:1236
Parameters
- clang::DiagnosticStorage* Storage
¶StreamingDiagnostic(
clang::StreamingDiagnostic::
DiagStorageAllocator& Alloc)
StreamingDiagnostic(
clang::StreamingDiagnostic::
DiagStorageAllocator& Alloc)
Description
Construct with a storage allocator which will manage the storage. The allocator is not a null pointer in this case.
Declared at: clang/include/clang/Basic/Diagnostic.h:1241
Parameters
¶StreamingDiagnostic(
const clang::StreamingDiagnostic& Diag)
StreamingDiagnostic(
const clang::StreamingDiagnostic& Diag)
Declared at: clang/include/clang/Basic/Diagnostic.h:1244
Parameters
- const clang::StreamingDiagnostic& Diag
¶StreamingDiagnostic(
clang::StreamingDiagnostic&& Diag)
StreamingDiagnostic(
clang::StreamingDiagnostic&& Diag)
Declared at: clang/include/clang/Basic/Diagnostic.h:1245
Parameters
- clang::StreamingDiagnostic&& Diag
¶void freeStorage()
void freeStorage()
Declared at: clang/include/clang/Basic/Diagnostic.h:1164
¶void freeStorageSlow()
void freeStorageSlow()
Declared at: clang/include/clang/Basic/Diagnostic.h:1177
¶clang::DiagnosticStorage* getStorage() const
clang::DiagnosticStorage* getStorage() const
Description
Retrieve storage for this particular diagnostic.
Declared at: clang/include/clang/Basic/Diagnostic.h:1155
¶bool operator bool() const
bool operator bool() const
Description
Conversion of StreamingDiagnostic to bool always returns \c true. This allows is to be used in boolean error contexts (where \c true is used to indicate that an error has occurred), like:
Declared at: clang/include/clang/Basic/Diagnostic.h:1229
¶~StreamingDiagnostic()
~StreamingDiagnostic()
Declared at: clang/include/clang/Basic/Diagnostic.h:1247