class PartialDiagnostic
Declaration
class PartialDiagnostic : public 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/PartialDiagnostic.h:31
Inherits from: StreamingDiagnostic
Member Variables
- private unsigned int DiagID = 0
- The diagnostic ID.
Inherited from StreamingDiagnostic:
- protected DiagStorage = nullptr
- protected Allocator = nullptr
Method Overview
- public void Emit(const clang::DiagnosticBuilder & DB) const
- public void EmitToString(clang::DiagnosticsEngine & Diags, SmallVectorImpl<char> & Buf) const
- public PartialDiagnostic(clang::PartialDiagnostic::NullDiagnostic)
- public PartialDiagnostic(unsigned int DiagID, clang::StreamingDiagnostic::DiagStorageAllocator & Allocator_)
- public PartialDiagnostic(const clang::PartialDiagnostic & Other)
- public PartialDiagnostic(clang::PartialDiagnostic && Other)
- public PartialDiagnostic(const clang::PartialDiagnostic & Other, clang::DiagnosticStorage * DiagStorage_)
- public PartialDiagnostic(const clang::Diagnostic & Other, clang::StreamingDiagnostic::DiagStorageAllocator & Allocator_)
- public void Reset(unsigned int DiagID = 0)
- public unsigned int getDiagID() const
- public llvm::StringRef getStringArg(unsigned int I)
- public bool hasStorage() const
- public void setDiagID(unsigned int ID)
- public void swap(clang::PartialDiagnostic & PD)
Inherited from StreamingDiagnostic:
- public AddFixItHint
- public AddSourceRange
- public AddString
- public AddTaggedVal
- public freeStorage
- public freeStorageSlow
- public getStorage
- public operator bool
Methods
¶void Emit(
const clang::DiagnosticBuilder& DB) const
void Emit(
const clang::DiagnosticBuilder& DB) const
Declared at: clang/include/clang/Basic/PartialDiagnostic.h:144
Parameters
- const clang::DiagnosticBuilder& DB
¶void EmitToString(
clang::DiagnosticsEngine& Diags,
SmallVectorImpl<char>& Buf) const
void EmitToString(
clang::DiagnosticsEngine& Diags,
SmallVectorImpl<char>& Buf) const
Declared at: clang/include/clang/Basic/PartialDiagnostic.h:167
Parameters
- clang::DiagnosticsEngine& Diags
- SmallVectorImpl<char>& Buf
¶PartialDiagnostic(
clang::PartialDiagnostic::NullDiagnostic)
PartialDiagnostic(
clang::PartialDiagnostic::NullDiagnostic)
Description
Create a null partial diagnostic, which cannot carry a payload, and only exists to be swapped with a real partial diagnostic.
Declared at: clang/include/clang/Basic/PartialDiagnostic.h:44
Parameters
¶PartialDiagnostic(
unsigned int DiagID,
clang::StreamingDiagnostic::
DiagStorageAllocator& Allocator_)
PartialDiagnostic(
unsigned int DiagID,
clang::StreamingDiagnostic::
DiagStorageAllocator& Allocator_)
Declared at: clang/include/clang/Basic/PartialDiagnostic.h:46
Parameters
- unsigned int DiagID
- clang::StreamingDiagnostic::DiagStorageAllocator& Allocator_
¶PartialDiagnostic(
const clang::PartialDiagnostic& Other)
PartialDiagnostic(
const clang::PartialDiagnostic& Other)
Declared at: clang/include/clang/Basic/PartialDiagnostic.h:49
Parameters
- const clang::PartialDiagnostic& Other
¶PartialDiagnostic(
clang::PartialDiagnostic&& Other)
PartialDiagnostic(
clang::PartialDiagnostic&& Other)
Declared at: clang/include/clang/Basic/PartialDiagnostic.h:75
Parameters
- clang::PartialDiagnostic&& Other
¶PartialDiagnostic(
const clang::PartialDiagnostic& Other,
clang::DiagnosticStorage* DiagStorage_)
PartialDiagnostic(
const clang::PartialDiagnostic& Other,
clang::DiagnosticStorage* DiagStorage_)
Declared at: clang/include/clang/Basic/PartialDiagnostic.h:81
Parameters
- const clang::PartialDiagnostic& Other
- clang::DiagnosticStorage* DiagStorage_
¶PartialDiagnostic(
const clang::Diagnostic& Other,
clang::StreamingDiagnostic::
DiagStorageAllocator& Allocator_)
PartialDiagnostic(
const clang::Diagnostic& Other,
clang::StreamingDiagnostic::
DiagStorageAllocator& Allocator_)
Declared at: clang/include/clang/Basic/PartialDiagnostic.h:90
Parameters
- const clang::Diagnostic& Other
- clang::StreamingDiagnostic::DiagStorageAllocator& Allocator_
¶void Reset(unsigned int DiagID = 0)
void Reset(unsigned int DiagID = 0)
Description
Clear out this partial diagnostic, giving it a new diagnostic ID and removing all of its arguments, ranges, and fix-it hints.
Declared at: clang/include/clang/Basic/PartialDiagnostic.h:180
Parameters
- unsigned int DiagID = 0
¶unsigned int getDiagID() const
unsigned int getDiagID() const
Declared at: clang/include/clang/Basic/PartialDiagnostic.h:141
¶llvm::StringRef getStringArg(unsigned int I)
llvm::StringRef getStringArg(unsigned int I)
Description
Retrieve the string argument at the given index.
Declared at: clang/include/clang/Basic/PartialDiagnostic.h:188
Parameters
- unsigned int I
¶bool hasStorage() const
bool hasStorage() const
Declared at: clang/include/clang/Basic/PartialDiagnostic.h:185
¶void setDiagID(unsigned int ID)
void setDiagID(unsigned int ID)
Declared at: clang/include/clang/Basic/PartialDiagnostic.h:142
Parameters
- unsigned int ID
¶void swap(clang::PartialDiagnostic& PD)
void swap(clang::PartialDiagnostic& PD)
Declared at: clang/include/clang/Basic/PartialDiagnostic.h:135