clang API Documentation

Classes | Public Types | Public Member Functions | Friends
clang::PartialDiagnostic Class Reference

#include <PartialDiagnostic.h>

List of all members.

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.
 PartialDiagnostic (unsigned DiagID, StorageAllocator &Allocator)
 PartialDiagnostic (const PartialDiagnostic &Other)
 PartialDiagnostic (const PartialDiagnostic &Other, Storage *DiagStorage)
 PartialDiagnostic (const Diagnostic &Other, StorageAllocator &Allocator)
PartialDiagnosticoperator= (const 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, llvm::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

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 SourceRange &R)
const PartialDiagnosticoperator<< (const PartialDiagnostic &PD, const CharSourceRange &R)
const PartialDiagnosticoperator<< (const PartialDiagnostic &PD, const FixItHint &Hint)

Detailed Description

Definition at line 26 of file PartialDiagnostic.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
MaxArguments 

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

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

Definition at line 188 of file PartialDiagnostic.h.

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

Definition at line 191 of file PartialDiagnostic.h.

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

Definition at line 200 of file PartialDiagnostic.h.

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

Definition at line 242 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,
llvm::SmallVectorImpl< char > &  Buf 
) const [inline]
unsigned clang::PartialDiagnostic::getDiagID ( ) const [inline]
bool clang::PartialDiagnostic::hasStorage ( ) const [inline]

Definition at line 317 of file PartialDiagnostic.h.

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

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

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

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

Definition at line 246 of file PartialDiagnostic.h.


Friends And Related Function Documentation

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

Definition at line 319 of file PartialDiagnostic.h.

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

Definition at line 325 of file PartialDiagnostic.h.

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

Definition at line 331 of file PartialDiagnostic.h.

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

Definition at line 338 of file PartialDiagnostic.h.

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

Definition at line 345 of file PartialDiagnostic.h.

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

Definition at line 351 of file PartialDiagnostic.h.

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

Definition at line 357 of file PartialDiagnostic.h.


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