clang 20.0.0git
|
Helper class that creates diagnostics with optional template instantiation stacks. More...
#include "clang/Sema/SemaBase.h"
Public Member Functions | |
ImmediateDiagBuilder (DiagnosticBuilder &DB, Sema &SemaRef, unsigned DiagID) | |
ImmediateDiagBuilder (DiagnosticBuilder &&DB, Sema &SemaRef, unsigned DiagID) | |
ImmediateDiagBuilder (const ImmediateDiagBuilder &)=default | |
~ImmediateDiagBuilder () | |
template<typename T , typename = std::enable_if_t<!std::is_lvalue_reference<T>::value>> | |
const ImmediateDiagBuilder & | operator<< (T &&V) const |
Public Member Functions inherited from clang::DiagnosticBuilder | |
DiagnosticBuilder (const DiagnosticBuilder &D) | |
Copy constructor. | |
template<typename T > | |
const DiagnosticBuilder & | operator<< (const T &V) const |
template<typename T , typename = std::enable_if_t<!std::is_lvalue_reference<T>::value>> | |
const DiagnosticBuilder & | operator<< (T &&V) const |
DiagnosticBuilder & | operator= (const DiagnosticBuilder &)=delete |
~DiagnosticBuilder () | |
Emits the diagnostic. | |
const DiagnosticBuilder & | setForceEmit () const |
Forces the diagnostic to be emitted. | |
void | addFlagValue (StringRef V) const |
Public Member Functions inherited from clang::StreamingDiagnostic | |
DiagnosticStorage * | getStorage () 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 . | |
Friends | |
template<typename T > | |
const ImmediateDiagBuilder & | operator<< (const ImmediateDiagBuilder &Diag, const T &Value) |
Teach operator<< to produce an object of the correct type. | |
Additional Inherited Members | |
Public Types inherited from clang::StreamingDiagnostic | |
using | DiagStorageAllocator = clang::DiagStorageAllocator |
Protected Member Functions inherited from clang::DiagnosticBuilder | |
void | Clear () const |
Clear out the current diagnostic. | |
bool | isActive () const |
Determine whether this diagnostic is still active. | |
bool | Emit () |
Force the diagnostic builder to emit the diagnostic now. | |
Protected Member Functions inherited from clang::StreamingDiagnostic | |
StreamingDiagnostic ()=default | |
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 | |
DiagnosticStorage * | DiagStorage = nullptr |
DiagStorageAllocator * | Allocator = nullptr |
Allocator used to allocate storage for this diagnostic. | |
Helper class that creates diagnostics with optional template instantiation stacks.
This class provides a wrapper around the basic DiagnosticBuilder class that emits diagnostics. ImmediateDiagBuilder is responsible for emitting the diagnostic (as DiagnosticBuilder does) and, if the diagnostic comes from inside a template instantiation, printing the template instantiation stack as well.
Definition at line 55 of file SemaBase.h.
|
inline |
Definition at line 60 of file SemaBase.h.
|
inline |
Definition at line 62 of file SemaBase.h.
|
default |
clang::SemaBase::ImmediateDiagBuilder::~ImmediateDiagBuilder | ( | ) |
Definition at line 13 of file SemaBase.cpp.
References clang::DiagnosticBuilder::Clear(), clang::Sema::EmitDiagnostic(), and clang::DiagnosticBuilder::isActive().
|
inline |
Definition at line 89 of file SemaBase.h.
References V.
|
friend |
Teach operator<< to produce an object of the correct type.
Definition at line 77 of file SemaBase.h.