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

Methods

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

Declared at: clang/include/clang/Basic/Diagnostic.h:1205

Parameters

const clang::CharSourceRange& R

void AddString(llvm::StringRef V) const

Declared at: clang/include/clang/Basic/Diagnostic.h:1194

Parameters

llvm::StringRef V

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()

Declared at: clang/include/clang/Basic/Diagnostic.h:1232

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)

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

clang::StreamingDiagnostic::DiagStorageAllocator& Alloc

StreamingDiagnostic(
    const clang::StreamingDiagnostic& Diag)

Declared at: clang/include/clang/Basic/Diagnostic.h:1244

Parameters

const clang::StreamingDiagnostic& Diag

StreamingDiagnostic(
    clang::StreamingDiagnostic&& Diag)

Declared at: clang/include/clang/Basic/Diagnostic.h:1245

Parameters

clang::StreamingDiagnostic&& Diag

void freeStorage()

Declared at: clang/include/clang/Basic/Diagnostic.h:1164

void freeStorageSlow()

Declared at: clang/include/clang/Basic/Diagnostic.h:1177

clang::DiagnosticStorage* getStorage() const

Description

Retrieve storage for this particular diagnostic.

Declared at: clang/include/clang/Basic/Diagnostic.h:1155

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()

Declared at: clang/include/clang/Basic/Diagnostic.h:1247