clang  14.0.0git
Public Member Functions | Friends | List of all members
clang::Sema::ImmediateDiagBuilder Class Reference

Helper class that creates diagnostics with optional template instantiation stacks. More...

#include "clang/Sema/Sema.h"

Inheritance diagram for clang::Sema::ImmediateDiagBuilder:
Inheritance graph
[legend]
Collaboration diagram for clang::Sema::ImmediateDiagBuilder:
Collaboration graph
[legend]

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 = typename std::enable_if< !std::is_lvalue_reference<T>::value>::type>
const ImmediateDiagBuilderoperator<< (T &&V) const
 
- Public Member Functions inherited from clang::DiagnosticBuilder
 DiagnosticBuilder (const DiagnosticBuilder &D)
 Copy constructor. More...
 
template<typename T >
const DiagnosticBuilderoperator<< (const T &V) const
 
template<typename T , typename = typename std::enable_if< !std::is_lvalue_reference<T>::value>::type>
const DiagnosticBuilderoperator<< (T &&V) const
 
DiagnosticBuilderoperator= (const DiagnosticBuilder &)=delete
 
 ~DiagnosticBuilder ()
 Emits the diagnostic. More...
 
const DiagnosticBuildersetForceEmit () const
 Forces the diagnostic to be emitted. More...
 
void addFlagValue (StringRef V) const
 
- Public Member Functions inherited from clang::StreamingDiagnostic
DiagnosticStoragegetStorage () const
 Retrieve storage for this particular diagnostic. More...
 
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. More...
 

Friends

template<typename T >
const friend ImmediateDiagBuilderoperator<< (const ImmediateDiagBuilder &Diag, const T &Value)
 Teach operator<< to produce an object of the correct type. More...
 

Additional Inherited Members

- Protected Member Functions inherited from clang::DiagnosticBuilder
void Clear () const
 Clear out the current diagnostic. More...
 
bool isActive () const
 Determine whether this diagnostic is still active. More...
 
bool Emit ()
 Force the diagnostic builder to emit the diagnostic now. More...
 
- 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

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 1611 of file Sema.h.

Constructor & Destructor Documentation

◆ ImmediateDiagBuilder() [1/3]

clang::Sema::ImmediateDiagBuilder::ImmediateDiagBuilder ( DiagnosticBuilder DB,
Sema SemaRef,
unsigned  DiagID 
)
inline

Definition at line 1616 of file Sema.h.

◆ ImmediateDiagBuilder() [2/3]

clang::Sema::ImmediateDiagBuilder::ImmediateDiagBuilder ( DiagnosticBuilder &&  DB,
Sema SemaRef,
unsigned  DiagID 
)
inline

Definition at line 1618 of file Sema.h.

◆ ImmediateDiagBuilder() [3/3]

clang::Sema::ImmediateDiagBuilder::ImmediateDiagBuilder ( const ImmediateDiagBuilder )
default

◆ ~ImmediateDiagBuilder()

clang::Sema::ImmediateDiagBuilder::~ImmediateDiagBuilder ( )
inline

Member Function Documentation

◆ operator<<()

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

Definition at line 1661 of file Sema.h.

References V.

Friends And Related Function Documentation

◆ operator<<

template<typename T >
const friend ImmediateDiagBuilder& operator<< ( const ImmediateDiagBuilder Diag,
const T &  Value 
)
friend

Teach operator<< to produce an object of the correct type.

Definition at line 1650 of file Sema.h.


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