GCC Middle and Back End API Reference
ana::diagnostic_emission_context Class Reference

#include <pending-diagnostic.h>

Collaboration diagram for ana::diagnostic_emission_context:

Public Member Functions

 diagnostic_emission_context (const saved_diagnostic &sd, rich_location &rich_loc, diagnostic_metadata &metadata, logger *logger)
 
const pending_diagnosticget_pending_diagnostic () const
 
bool warn (const char *,...) ATTRIBUTE_GCC_DIAG(2
 
bool void inform (const char *,...) ATTRIBUTE_GCC_DIAG(2
 
bool void location_t get_location () const
 
loggerget_logger () const
 
void add_cwe (int cwe)
 
void add_rule (const diagnostic_metadata::rule &r)
 

Private Attributes

const saved_diagnosticm_sd
 
rich_location & m_rich_loc
 
diagnostic_metadatam_metadata
 
loggerm_logger
 

Detailed Description

A bundle of information for use by implementations of the
pending_diagnostic::emit vfunc.

The rich_location will have already been populated with a
diagnostic_path.   

Constructor & Destructor Documentation

◆ diagnostic_emission_context()

ana::diagnostic_emission_context::diagnostic_emission_context ( const saved_diagnostic & sd,
rich_location & rich_loc,
diagnostic_metadata & metadata,
logger * logger )
inline

Member Function Documentation

◆ add_cwe()

void ana::diagnostic_emission_context::add_cwe ( int cwe)
inline

◆ add_rule()

void ana::diagnostic_emission_context::add_rule ( const diagnostic_metadata::rule & r)
inline

◆ get_location()

bool void location_t ana::diagnostic_emission_context::get_location ( ) const
inline

References m_rich_loc.

◆ get_logger()

logger * ana::diagnostic_emission_context::get_logger ( ) const
inline

References m_logger.

◆ get_pending_diagnostic()

const pending_diagnostic & ana::diagnostic_emission_context::get_pending_diagnostic ( ) const

◆ inform()

bool void ana::diagnostic_emission_context::inform ( const char * ,
... )

◆ warn()

bool ana::diagnostic_emission_context::warn ( const char * ,
... )

Field Documentation

◆ m_logger

logger* ana::diagnostic_emission_context::m_logger
private

Referenced by get_logger().

◆ m_metadata

diagnostic_metadata& ana::diagnostic_emission_context::m_metadata
private

Referenced by add_cwe(), and add_rule().

◆ m_rich_loc

rich_location& ana::diagnostic_emission_context::m_rich_loc
private

Referenced by get_location().

◆ m_sd

const saved_diagnostic& ana::diagnostic_emission_context::m_sd
private

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