clang  14.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]
Collaboration diagram for clang::PartialDiagnostic:
Collaboration 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. More...
 
 PartialDiagnostic (unsigned DiagID, DiagStorageAllocator &Allocator_)
 
 PartialDiagnostic (const PartialDiagnostic &Other)
 
template<typename T >
const PartialDiagnosticoperator<< (const T &V) const
 
template<typename T , typename = typename std::enable_if< !std::is_lvalue_reference<T>::value>::type>
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. More...
 
bool hasStorage () const
 
StringRef getStringArg (unsigned I)
 Retrieve the string argument at the given index. More...
 
- Public Member Functions inherited from clang::StreamingDiagnostic
DiagnosticStoragegetStorage () const
 Retrieve storage for this particular diagnostic. More...
 
void freeStorage ()
 
void freeStorageSlow ()
 
void AddTaggedVal (intptr_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. More...
 

Additional Inherited Members

- Protected Member Functions inherited from clang::StreamingDiagnostic
 StreamingDiagnostic ()=default
 
 StreamingDiagnostic (DiagnosticStorage *Storage)
 Construct with an external storage not owned by itself. More...
 
 StreamingDiagnostic (DiagStorageAllocator &Alloc)
 Construct with a storage allocator which will manage the storage. More...
 
 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. More...
 

Detailed Description

Definition at line 34 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 47 of file PartialDiagnostic.h.

◆ PartialDiagnostic() [2/6]

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

Definition at line 49 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 188 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 61 of file PartialDiagnostic.h.

References V.

◆ operator<<() [2/2]

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

Definition at line 72 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 183 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 145 of file PartialDiagnostic.h.

◆ swap()

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

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