GCC Middle and Back End API Reference
diagnostic_manager Struct Reference
Collaboration diagram for diagnostic_manager:

Public Member Functions

 diagnostic_manager ()
 
 ~diagnostic_manager ()
 
line_maps * get_line_table ()
 
diagnostic_contextget_dc ()
 
void write_patch (FILE *dst_stream)
 
void add_sink (std::unique_ptr< sink > sink)
 
void emit (diagnostic &diag, const char *msgid, va_list *args) LIBGDIAGNOSTICS_PARAM_GCC_FORMAT_STRING(3
 
void diagnostic_filenew_file (const char *name, const char *sarif_source_language)
 
const diagnostic_physical_locationnew_location_from_file_and_line (const diagnostic_file *file, diagnostic_line_num_t line_num)
 
const diagnostic_physical_locationnew_location_from_file_line_column (const diagnostic_file *file, diagnostic_line_num_t line_num, diagnostic_column_num_t column_num)
 
const diagnostic_physical_locationnew_location_from_range (const diagnostic_physical_location *loc_caret, const diagnostic_physical_location *loc_start, const diagnostic_physical_location *loc_end)
 
const diagnostic_logical_locationnew_logical_location (enum diagnostic_logical_location_kind_t kind, const diagnostic_logical_location *parent, const char *short_name, const char *fully_qualified_name, const char *decorated_name)
 
diagnostic_execution_pathnew_execution_path ()
 
void begin_group ()
 
void end_group ()
 
const char * maybe_get_sarif_source_language (const char *filename)
 
const diagnosticget_current_diag ()
 
const client_version_infoget_client_version_info () const
 
impl_client_version_infoget_client_version_info ()
 
void assert_valid_diagnostic_physical_location (const diagnostic_physical_location *loc) const
 
void set_line_table_global () const
 
const diagnostic_logical_locationget_prev_diag_logical_loc () const
 

Private Types

typedef std::map< diagnostic_logical_location, std::unique_ptr< diagnostic_logical_location > > logical_locs_map_t
 

Private Member Functions

void ensure_linemap_for_file_and_line (const diagnostic_file *file, diagnostic_line_num_t linenum)
 
const diagnostic_physical_locationnew_location (location_t loc)
 

Private Attributes

diagnostic_context m_dc
 
line_maps m_line_table
 
impl_client_version_info m_client_version_info
 
std::vector< std::unique_ptr< sink > > m_sinks
 
hash_map< nofree_string_hash, diagnostic_file * > m_str_to_file_map
 
hash_map< int_hash< location_t, UNKNOWN_LOCATION, location_t(-1)>, diagnostic_physical_location * > m_location_t_map
 
logical_locs_map_t m_logical_locs
 
const diagnosticm_current_diag
 
const diagnostic_logical_locationm_prev_diag_logical_loc
 
std::unique_ptr< edit_contextm_edit_context
 

Detailed Description

This has to be a "struct" as it is exposed in the C API.   

Member Typedef Documentation

◆ logical_locs_map_t

Constructor & Destructor Documentation

◆ diagnostic_manager()

◆ ~diagnostic_manager()

diagnostic_manager::~diagnostic_manager ( )
inline

References diagnostic_finish(), free(), and i.

Member Function Documentation

◆ add_sink()

void diagnostic_manager::add_sink ( std::unique_ptr< sink > sink)
inline

◆ assert_valid_diagnostic_physical_location()

◆ begin_group()

void diagnostic_manager::begin_group ( )
inline

◆ emit()

◆ end_group()

void diagnostic_manager::end_group ( )
inline

◆ ensure_linemap_for_file_and_line()

void diagnostic_manager::ensure_linemap_for_file_and_line ( const diagnostic_file * file,
diagnostic_line_num_t linenum )
inlineprivate

◆ get_client_version_info() [1/2]

impl_client_version_info * diagnostic_manager::get_client_version_info ( )
inline

◆ get_client_version_info() [2/2]

◆ get_current_diag()

const diagnostic * diagnostic_manager::get_current_diag ( )
inline

◆ get_dc()

◆ get_line_table()

line_maps * diagnostic_manager::get_line_table ( )
inline

Referenced by sarif_sink::sarif_sink().

◆ get_prev_diag_logical_loc()

const diagnostic_logical_location * diagnostic_manager::get_prev_diag_logical_loc ( ) const
inline

◆ maybe_get_sarif_source_language()

const char * diagnostic_manager::maybe_get_sarif_source_language ( const char * filename)
inline

◆ new_execution_path()

diagnostic_execution_path * diagnostic_manager::new_execution_path ( )

◆ new_file()

void diagnostic_file * diagnostic_manager::new_file ( const char * name,
const char * sarif_source_language )
inline

◆ new_location()

const diagnostic_physical_location * diagnostic_manager::new_location ( location_t loc)
inlineprivate

References UNKNOWN_LOCATION.

◆ new_location_from_file_and_line()

const diagnostic_physical_location * diagnostic_manager::new_location_from_file_and_line ( const diagnostic_file * file,
diagnostic_line_num_t line_num )
inline

◆ new_location_from_file_line_column()

const diagnostic_physical_location * diagnostic_manager::new_location_from_file_line_column ( const diagnostic_file * file,
diagnostic_line_num_t line_num,
diagnostic_column_num_t column_num )
inline

◆ new_location_from_range()

const diagnostic_physical_location * diagnostic_manager::new_location_from_range ( const diagnostic_physical_location * loc_caret,
const diagnostic_physical_location * loc_start,
const diagnostic_physical_location * loc_end )
inline

◆ new_logical_location()

const diagnostic_logical_location * diagnostic_manager::new_logical_location ( enum diagnostic_logical_location_kind_t kind,
const diagnostic_logical_location * parent,
const char * short_name,
const char * fully_qualified_name,
const char * decorated_name )
inline

◆ set_line_table_global()

◆ write_patch()

void diagnostic_manager::write_patch ( FILE * dst_stream)
struct diagnostic_manager.   

References m_edit_context, pp_flush(), and pretty_printer::set_output_stream().

Referenced by diagnostic_manager_write_patch().

Field Documentation

◆ m_client_version_info

impl_client_version_info diagnostic_manager::m_client_version_info
private

◆ m_current_diag

const diagnostic* diagnostic_manager::m_current_diag
private

Referenced by emit().

◆ m_dc

diagnostic_context diagnostic_manager::m_dc
private

Referenced by emit().

◆ m_edit_context

std::unique_ptr<edit_context> diagnostic_manager::m_edit_context
private

Referenced by emit(), and write_patch().

◆ m_line_table

line_maps diagnostic_manager::m_line_table
private

◆ m_location_t_map

hash_map<int_hash<location_t, UNKNOWN_LOCATION, location_t (-1)>, diagnostic_physical_location *> diagnostic_manager::m_location_t_map
private

◆ m_logical_locs

logical_locs_map_t diagnostic_manager::m_logical_locs
private

◆ m_prev_diag_logical_loc

const diagnostic_logical_location* diagnostic_manager::m_prev_diag_logical_loc
private

Referenced by emit().

◆ m_sinks

std::vector<std::unique_ptr<sink> > diagnostic_manager::m_sinks
private

◆ m_str_to_file_map

hash_map<nofree_string_hash, diagnostic_file *> diagnostic_manager::m_str_to_file_map
private

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