clang  10.0.0svn
Public Member Functions | Friends | List of all members
clang::Sema::SemaDiagnosticBuilder Class Reference

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

#include "clang/Sema/Sema.h"

Inheritance diagram for clang::Sema::SemaDiagnosticBuilder:
Inheritance graph
Collaboration diagram for clang::Sema::SemaDiagnosticBuilder:
Collaboration graph

Public Member Functions

 SemaDiagnosticBuilder (DiagnosticBuilder &DB, Sema &SemaRef, unsigned DiagID)
 SemaDiagnosticBuilder (const SemaDiagnosticBuilder &)=default
 ~SemaDiagnosticBuilder ()
- Public Member Functions inherited from clang::DiagnosticBuilder
 DiagnosticBuilder (const DiagnosticBuilder &D)
 Copy constructor. More...
DiagnosticBuilderoperator= (const DiagnosticBuilder &)=delete
 ~DiagnosticBuilder ()
 Emits the diagnostic. More...
const DiagnosticBuildersetForceEmit () const
 Forces the diagnostic to be emitted. More...
 operator bool () const
 Conversion of DiagnosticBuilder to bool always returns true. More...
void AddString (StringRef S) const
void AddTaggedVal (intptr_t V, DiagnosticsEngine::ArgumentKind Kind) const
void AddSourceRange (const CharSourceRange &R) const
void AddFixItHint (const FixItHint &Hint) const
void addFlagValue (StringRef V) const


template<typename T >
const SemaDiagnosticBuilderoperator<< (const SemaDiagnosticBuilder &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 FlushCounts ()
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...

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

Constructor & Destructor Documentation

◆ SemaDiagnosticBuilder() [1/2]

clang::Sema::SemaDiagnosticBuilder::SemaDiagnosticBuilder ( DiagnosticBuilder DB,
Sema SemaRef,
unsigned  DiagID 

Definition at line 1329 of file Sema.h.

◆ SemaDiagnosticBuilder() [2/2]

clang::Sema::SemaDiagnosticBuilder::SemaDiagnosticBuilder ( const SemaDiagnosticBuilder )

◆ ~SemaDiagnosticBuilder()

clang::Sema::SemaDiagnosticBuilder::~SemaDiagnosticBuilder ( )

Definition at line 1340 of file Sema.h.

References clang::Sema::EmitCurrentDiagnostic().

Friends And Related Function Documentation

◆ operator<<

template<typename T >
const SemaDiagnosticBuilder& operator<< ( const SemaDiagnosticBuilder Diag,
const T &  Value 

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

Definition at line 1362 of file Sema.h.

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