GCC Middle and Back End API Reference
diagnostic_option_classifier Class Reference

#include <diagnostic.h>

Collaboration diagram for diagnostic_option_classifier:

Data Structures

struct  diagnostic_classification_change_t
 

Public Member Functions

void init (int n_opts)
 
void fini ()
 
void push ()
 
void pop (location_t where)
 
bool option_unspecified_p (int opt) const
 
diagnostic_t get_current_override (int opt) const
 
diagnostic_t classify_diagnostic (const diagnostic_context *context, int option_index, diagnostic_t new_kind, location_t where)
 
diagnostic_t update_effective_level_from_pragmas (diagnostic_info *diagnostic) const
 

Private Attributes

int m_n_opts
 
diagnostic_tm_classify_diagnostic
 
diagnostic_classification_change_tm_classification_history
 
int m_n_classification_history
 
int * m_push_list
 
int m_n_push
 

Detailed Description

A stack of sets of classifications: each entry in the stack is
a mapping from option index to diagnostic severity that can be changed
via pragmas.  The stack can be pushed and popped.   

Member Function Documentation

◆ classify_diagnostic()

diagnostic_t diagnostic_option_classifier::classify_diagnostic ( const diagnostic_context * context,
int option_index,
diagnostic_t new_kind,
location_t where )

◆ fini()

void diagnostic_option_classifier::fini ( )

◆ get_current_override()

diagnostic_t diagnostic_option_classifier::get_current_override ( int opt) const
inline

◆ init()

void diagnostic_option_classifier::init ( int n_opts)

◆ option_unspecified_p()

bool diagnostic_option_classifier::option_unspecified_p ( int opt) const
inline

◆ pop()

void diagnostic_option_classifier::pop ( location_t where)

◆ push()

void diagnostic_option_classifier::push ( )
Save all diagnostic classifications in a stack.   

References m_n_classification_history, m_n_push, and m_push_list.

Referenced by diagnostic_context::push_diagnostics().

◆ update_effective_level_from_pragmas()

diagnostic_t diagnostic_option_classifier::update_effective_level_from_pragmas ( diagnostic_info * diagnostic) const
Update the kind of DIAGNOSTIC based on its location(s), including
any of those in its inlining stack, relative to any
  #pragma GCC diagnostic
directives recorded within this object.

Return the new kind of DIAGNOSTIC if it was updated, or DK_UNSPECIFIED
otherwise.   

References DK_POP, i, diagnostic_info::kind, diagnostic_option_classifier::diagnostic_classification_change_t::kind, line_table, diagnostic_option_classifier::diagnostic_classification_change_t::location, m_classification_history, diagnostic_info::m_iinfo, diagnostic_info::inlining_info::m_ilocs, m_n_classification_history, diagnostic_option_classifier::diagnostic_classification_change_t::option, option(), and diagnostic_info::option_index.

Referenced by diagnostic_context::diagnostic_enabled().

Field Documentation

◆ m_classification_history

diagnostic_classification_change_t* diagnostic_option_classifier::m_classification_history
private

◆ m_classify_diagnostic

diagnostic_t* diagnostic_option_classifier::m_classify_diagnostic
private

◆ m_n_classification_history

int diagnostic_option_classifier::m_n_classification_history
private

◆ m_n_opts

int diagnostic_option_classifier::m_n_opts
private

◆ m_n_push

int diagnostic_option_classifier::m_n_push
private

Referenced by fini(), init(), pop(), and push().

◆ m_push_list

int* diagnostic_option_classifier::m_push_list
private

Referenced by fini(), init(), pop(), and push().


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