clang  3.7.0
Classes | Public Types | Public Member Functions | Friends | List of all members
clang::PartialDiagnostic Class Reference

#include <PartialDiagnostic.h>

Classes

struct  NullDiagnostic
 
struct  Storage
 
class  StorageAllocator
 An allocator for Storage objects, which uses a small cache to objects, used to reduce malloc()/free() traffic for partial diagnostics. More...
 

Public Types

enum  { MaxArguments = DiagnosticsEngine::MaxArguments }
 

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, StorageAllocator &Allocator)
 
 PartialDiagnostic (const PartialDiagnostic &Other)
 
 PartialDiagnostic (PartialDiagnostic &&Other)
 
 PartialDiagnostic (const PartialDiagnostic &Other, Storage *DiagStorage)
 
 PartialDiagnostic (const Diagnostic &Other, StorageAllocator &Allocator)
 
PartialDiagnosticoperator= (const PartialDiagnostic &Other)
 
PartialDiagnosticoperator= (PartialDiagnostic &&Other)
 
 ~PartialDiagnostic ()
 
void swap (PartialDiagnostic &PD)
 
unsigned getDiagID () const
 
void AddTaggedVal (intptr_t V, DiagnosticsEngine::ArgumentKind Kind) const
 
void AddString (StringRef V) const
 
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
 

Friends

const PartialDiagnosticoperator<< (const PartialDiagnostic &PD, unsigned I)
 
const PartialDiagnosticoperator<< (const PartialDiagnostic &PD, int I)
 
const PartialDiagnosticoperator<< (const PartialDiagnostic &PD, const char *S)
 
const PartialDiagnosticoperator<< (const PartialDiagnostic &PD, StringRef S)
 
const PartialDiagnosticoperator<< (const PartialDiagnostic &PD, const IdentifierInfo *II)
 
template<typename T >
std::enable_if< std::is_same
< T, DeclContext >::value,
const PartialDiagnostic & >
::type 
operator<< (const PartialDiagnostic &PD, T *DC)
 
const PartialDiagnosticoperator<< (const PartialDiagnostic &PD, const SourceRange &R)
 
const PartialDiagnosticoperator<< (const PartialDiagnostic &PD, const CharSourceRange &R)
 
const PartialDiagnosticoperator<< (const PartialDiagnostic &PD, const FixItHint &Hint)
 

Detailed Description

Definition at line 28 of file PartialDiagnostic.h.

Member Enumeration Documentation

anonymous enum
Enumerator
MaxArguments 

Definition at line 30 of file PartialDiagnostic.h.

Constructor & Destructor Documentation

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 181 of file PartialDiagnostic.h.

clang::PartialDiagnostic::PartialDiagnostic ( unsigned  DiagID,
StorageAllocator Allocator 
)
inline

Definition at line 184 of file PartialDiagnostic.h.

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

Definition at line 187 of file PartialDiagnostic.h.

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

Definition at line 196 of file PartialDiagnostic.h.

clang::PartialDiagnostic::PartialDiagnostic ( const PartialDiagnostic Other,
Storage DiagStorage 
)
inline

Definition at line 202 of file PartialDiagnostic.h.

clang::PartialDiagnostic::PartialDiagnostic ( const Diagnostic Other,
StorageAllocator Allocator 
)
inline
clang::PartialDiagnostic::~PartialDiagnostic ( )
inline

Definition at line 255 of file PartialDiagnostic.h.

Member Function Documentation

void clang::PartialDiagnostic::AddString ( StringRef  V) const
inline
void clang::PartialDiagnostic::AddTaggedVal ( intptr_t  V,
DiagnosticsEngine::ArgumentKind  Kind 
) const
inline
void clang::PartialDiagnostic::Emit ( const DiagnosticBuilder DB) const
inline
void clang::PartialDiagnostic::EmitToString ( DiagnosticsEngine Diags,
SmallVectorImpl< char > &  Buf 
) const
inline
unsigned clang::PartialDiagnostic::getDiagID ( ) const
inline
bool clang::PartialDiagnostic::hasStorage ( ) const
inline

Definition at line 330 of file PartialDiagnostic.h.

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

Definition at line 230 of file PartialDiagnostic.h.

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

Definition at line 244 of file PartialDiagnostic.h.

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 325 of file PartialDiagnostic.h.

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

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

Definition at line 259 of file PartialDiagnostic.h.

Friends And Related Function Documentation

const PartialDiagnostic& operator<< ( const PartialDiagnostic PD,
unsigned  I 
)
friend

Definition at line 332 of file PartialDiagnostic.h.

const PartialDiagnostic& operator<< ( const PartialDiagnostic PD,
int  I 
)
friend

Definition at line 338 of file PartialDiagnostic.h.

const PartialDiagnostic& operator<< ( const PartialDiagnostic PD,
const char *  S 
)
friend

Definition at line 344 of file PartialDiagnostic.h.

const PartialDiagnostic& operator<< ( const PartialDiagnostic PD,
StringRef  S 
)
friend

Definition at line 351 of file PartialDiagnostic.h.

const PartialDiagnostic& operator<< ( const PartialDiagnostic PD,
const IdentifierInfo II 
)
friend

Definition at line 358 of file PartialDiagnostic.h.

template<typename T >
std::enable_if<std::is_same<T, DeclContext>::value, const PartialDiagnostic &>::type operator<< ( const PartialDiagnostic PD,
T *  DC 
)
friend

Definition at line 373 of file PartialDiagnostic.h.

const PartialDiagnostic& operator<< ( const PartialDiagnostic PD,
const SourceRange R 
)
friend

Definition at line 379 of file PartialDiagnostic.h.

const PartialDiagnostic& operator<< ( const PartialDiagnostic PD,
const CharSourceRange R 
)
friend

Definition at line 385 of file PartialDiagnostic.h.

const PartialDiagnostic& operator<< ( const PartialDiagnostic PD,
const FixItHint Hint 
)
friend

Definition at line 391 of file PartialDiagnostic.h.


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