clang API Documentation
#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. | |
PartialDiagnostic (unsigned DiagID, StorageAllocator &Allocator) | |
PartialDiagnostic (const PartialDiagnostic &Other) | |
PartialDiagnostic (PartialDiagnostic &&Other) | |
PartialDiagnostic (const PartialDiagnostic &Other, Storage *DiagStorage) | |
PartialDiagnostic (const Diagnostic &Other, StorageAllocator &Allocator) | |
PartialDiagnostic & | operator= (const PartialDiagnostic &Other) |
PartialDiagnostic & | operator= (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. | |
bool | hasStorage () const |
Friends | |
const PartialDiagnostic & | operator<< (const PartialDiagnostic &PD, unsigned I) |
const PartialDiagnostic & | operator<< (const PartialDiagnostic &PD, int I) |
const PartialDiagnostic & | operator<< (const PartialDiagnostic &PD, const char *S) |
const PartialDiagnostic & | operator<< (const PartialDiagnostic &PD, StringRef S) |
const PartialDiagnostic & | operator<< (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 PartialDiagnostic & | operator<< (const PartialDiagnostic &PD, const SourceRange &R) |
const PartialDiagnostic & | operator<< (const PartialDiagnostic &PD, const CharSourceRange &R) |
const PartialDiagnostic & | operator<< (const PartialDiagnostic &PD, const FixItHint &Hint) |
Definition at line 28 of file PartialDiagnostic.h.
anonymous enum |
Definition at line 30 of file PartialDiagnostic.h.
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] |
Definition at line 210 of file PartialDiagnostic.h.
References AddString(), AddTaggedVal(), clang::DiagnosticsEngine::ak_std_string, clang::Diagnostic::getArgKind(), clang::Diagnostic::getArgStdStr(), clang::Diagnostic::getFixItHint(), clang::Diagnostic::getNumArgs(), clang::Diagnostic::getNumFixItHints(), clang::Diagnostic::getNumRanges(), clang::Diagnostic::getRange(), and clang::Diagnostic::getRawArg().
clang::PartialDiagnostic::~PartialDiagnostic | ( | ) | [inline] |
Definition at line 255 of file PartialDiagnostic.h.
void clang::PartialDiagnostic::AddString | ( | StringRef | V | ) | const [inline] |
Definition at line 277 of file PartialDiagnostic.h.
References clang::DiagnosticsEngine::ak_std_string, clang::PartialDiagnostic::Storage::DiagArgumentsKind, clang::PartialDiagnostic::Storage::DiagArgumentsStr, clang::PartialDiagnostic::Storage::MaxArguments, and clang::PartialDiagnostic::Storage::NumDiagArgs.
Referenced by PartialDiagnostic().
void clang::PartialDiagnostic::AddTaggedVal | ( | intptr_t | V, |
DiagnosticsEngine::ArgumentKind | Kind | ||
) | const [inline] |
Definition at line 267 of file PartialDiagnostic.h.
References clang::PartialDiagnostic::Storage::DiagArgumentsKind, clang::PartialDiagnostic::Storage::DiagArgumentsVal, clang::PartialDiagnostic::Storage::MaxArguments, and clang::PartialDiagnostic::Storage::NumDiagArgs.
Referenced by clang::operator<<(), and PartialDiagnostic().
void clang::PartialDiagnostic::Emit | ( | const DiagnosticBuilder & | DB | ) | const [inline] |
Definition at line 288 of file PartialDiagnostic.h.
References clang::DiagnosticBuilder::AddFixItHint(), clang::DiagnosticBuilder::AddSourceRange(), clang::DiagnosticBuilder::AddString(), clang::DiagnosticBuilder::AddTaggedVal(), clang::DiagnosticsEngine::ak_std_string, clang::PartialDiagnostic::Storage::DiagArgumentsKind, clang::PartialDiagnostic::Storage::DiagArgumentsStr, clang::PartialDiagnostic::Storage::DiagArgumentsVal, clang::PartialDiagnostic::Storage::DiagRanges, clang::PartialDiagnostic::Storage::FixItHints, and clang::PartialDiagnostic::Storage::NumDiagArgs.
Referenced by clang::Sema::Diag(), EmitToString(), and clang::operator<<().
void clang::PartialDiagnostic::EmitToString | ( | DiagnosticsEngine & | Diags, |
SmallVectorImpl< char > & | Buf | ||
) | const [inline] |
Definition at line 311 of file PartialDiagnostic.h.
References clang::DiagnosticsEngine::Clear(), Emit(), clang::Diagnostic::FormatDiagnostic(), getDiagID(), and clang::DiagnosticsEngine::Report().
unsigned clang::PartialDiagnostic::getDiagID | ( | ) | const [inline] |
Definition at line 265 of file PartialDiagnostic.h.
Referenced by clang::Sema::CheckEquivalentExceptionSpec(), clang::Sema::CheckExceptionSpecSubset(), clang::Sema::Diag(), clang::Sema::diagnoseTypo(), EmitToString(), and clang::sema::AccessedEntity::isQuiet().
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.
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.
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.