clang 20.0.0git
Classes | Public Member Functions | List of all members
clang::PartialDiagnostic Class Reference

#include "clang/Basic/PartialDiagnostic.h"

Inheritance diagram for clang::PartialDiagnostic:
Inheritance graph
[legend]

Classes

struct  NullDiagnostic
 

Public Member Functions

 PartialDiagnostic (NullDiagnostic)
 Create a null partial diagnostic, which cannot carry a payload, and only exists to be swapped with a real partial diagnostic.
 
 PartialDiagnostic (unsigned DiagID, DiagStorageAllocator &Allocator_)
 
 PartialDiagnostic (const PartialDiagnostic &Other)
 
template<typename T >
const PartialDiagnosticoperator<< (const T &V) const
 
template<typename T , typename = std::enable_if_t<!std::is_lvalue_reference<T>::value>>
const PartialDiagnosticoperator<< (T &&V) const
 
 PartialDiagnostic (PartialDiagnostic &&Other)
 
 PartialDiagnostic (const PartialDiagnostic &Other, DiagnosticStorage *DiagStorage_)
 
 PartialDiagnostic (const Diagnostic &Other, DiagStorageAllocator &Allocator_)
 
PartialDiagnosticoperator= (const PartialDiagnostic &Other)
 
PartialDiagnosticoperator= (PartialDiagnostic &&Other)
 
void swap (PartialDiagnostic &PD)
 
unsigned getDiagID () const
 
void setDiagID (unsigned ID)
 
void Emit (const DiagnosticBuilder &DB) const
 
void EmitToString (DiagnosticsEngine &Diags, SmallVectorImpl< char > &Buf) const
 
void Reset (unsigned DiagID=0)
 Clear out this partial diagnostic, giving it a new diagnostic ID and removing all of its arguments, ranges, and fix-it hints.
 
bool hasStorage () const
 
StringRef getStringArg (unsigned I)
 Retrieve the string argument at the given index.
 
- Public Member Functions inherited from clang::StreamingDiagnostic
DiagnosticStoragegetStorage () 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.
 

Additional Inherited Members

- Protected Member Functions inherited from clang::StreamingDiagnostic
 StreamingDiagnostic ()=default
 
 StreamingDiagnostic (DiagnosticStorage *Storage)
 Construct with an external storage not owned by itself.
 
 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 inherited from clang::StreamingDiagnostic
DiagnosticStorageDiagStorage = nullptr
 
DiagStorageAllocatorAllocator = nullptr
 Allocator used to allocate storage for this diagnostic.
 

Detailed Description

Definition at line 31 of file PartialDiagnostic.h.

Constructor & Destructor Documentation

◆ PartialDiagnostic() [1/6]

clang::PartialDiagnostic::PartialDiagnostic ( NullDiagnostic  )
inline

Create a null partial diagnostic, which cannot carry a payload, and only exists to be swapped with a real partial diagnostic.

Definition at line 44 of file PartialDiagnostic.h.

◆ PartialDiagnostic() [2/6]

clang::PartialDiagnostic::PartialDiagnostic ( unsigned  DiagID,
DiagStorageAllocator Allocator_ 
)
inline

Definition at line 46 of file PartialDiagnostic.h.

◆ PartialDiagnostic() [3/6]

clang::PartialDiagnostic::PartialDiagnostic ( const PartialDiagnostic Other)
inline

◆ PartialDiagnostic() [4/6]

clang::PartialDiagnostic::PartialDiagnostic ( PartialDiagnostic &&  Other)
inline

◆ PartialDiagnostic() [5/6]

clang::PartialDiagnostic::PartialDiagnostic ( const PartialDiagnostic Other,
DiagnosticStorage DiagStorage_ 
)
inline

◆ PartialDiagnostic() [6/6]

clang::PartialDiagnostic::PartialDiagnostic ( const Diagnostic Other,
DiagStorageAllocator Allocator_ 
)
inline

Member Function Documentation

◆ Emit()

void clang::PartialDiagnostic::Emit ( const DiagnosticBuilder DB) const
inline

◆ EmitToString()

void clang::PartialDiagnostic::EmitToString ( DiagnosticsEngine Diags,
SmallVectorImpl< char > &  Buf 
) const
inline

◆ getDiagID()

unsigned clang::PartialDiagnostic::getDiagID ( ) const
inline

◆ getStringArg()

StringRef clang::PartialDiagnostic::getStringArg ( unsigned  I)
inline

◆ hasStorage()

bool clang::PartialDiagnostic::hasStorage ( ) const
inline

Definition at line 185 of file PartialDiagnostic.h.

References clang::StreamingDiagnostic::DiagStorage.

◆ operator<<() [1/2]

template<typename T >
const PartialDiagnostic & clang::PartialDiagnostic::operator<< ( const T V) const
inline

Definition at line 58 of file PartialDiagnostic.h.

References V.

◆ operator<<() [2/2]

template<typename T , typename = std::enable_if_t<!std::is_lvalue_reference<T>::value>>
const PartialDiagnostic & clang::PartialDiagnostic::operator<< ( T &&  V) const
inline

Definition at line 69 of file PartialDiagnostic.h.

References V.

◆ operator=() [1/2]

PartialDiagnostic & clang::PartialDiagnostic::operator= ( const PartialDiagnostic Other)
inline

◆ operator=() [2/2]

PartialDiagnostic & clang::PartialDiagnostic::operator= ( PartialDiagnostic &&  Other)
inline

◆ Reset()

void clang::PartialDiagnostic::Reset ( unsigned  DiagID = 0)
inline

Clear out this partial diagnostic, giving it a new diagnostic ID and removing all of its arguments, ranges, and fix-it hints.

Definition at line 180 of file PartialDiagnostic.h.

References clang::StreamingDiagnostic::freeStorage().

Referenced by clang::sema::AccessedEntity::setDiag().

◆ setDiagID()

void clang::PartialDiagnostic::setDiagID ( unsigned  ID)
inline

Definition at line 142 of file PartialDiagnostic.h.

References ID.

◆ swap()

void clang::PartialDiagnostic::swap ( PartialDiagnostic PD)
inline

The documentation for this class was generated from the following file: