GCC Middle and Back End API Reference
common.h File Reference
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tree.h"
#include "function.h"
#include "basic-block.h"
#include "gimple.h"
#include "options.h"
#include "bitmap.h"
#include "diagnostic-core.h"
#include "diagnostic-path.h"
#include "rich-location.h"
#include "json.h"
#include "tristate.h"
Include dependency graph for common.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  ana::path_var
class  ana::region_offset
class  ana::known_function
class  ana::builtin_known_function
class  ana::internal_known_function
class  ana::pure_known_function_with_default_return
class  ana::plugin_analyzer_init_iface
class  ana::custom_edge_info
class  ana::path_context
class  auto_cfun
struct  pod_hash_traits< Type >
struct  member_function_hash_traits< Type >
class  consolidation_map< T >

Namespaces

namespace  ana

Macros

#define INCLUDE_VECTOR

Typedefs

typedef hash_set< const svalue * > ana::svalue_set
typedef offset_int ana::bit_offset_t
typedef offset_int ana::bit_size_t
typedef offset_int ana::byte_offset_t
typedef offset_int ana::byte_size_t

Enumerations

enum class  ana::access_direction { ana::read , ana::write }

Functions

void ana::dump_tree (pretty_printer *pp, tree t)
void ana::dump_quoted_tree (pretty_printer *pp, tree t)
void ana::print_quoted_type (pretty_printer *pp, tree t)
void ana::print_expr_for_user (pretty_printer *pp, tree t)
int ana::readability_comparator (const void *p1, const void *p2)
int ana::tree_cmp (const void *p1, const void *p2)
tree ana::fixup_tree_for_diagnostic (tree)
tree ana::get_diagnostic_tree_for_gassign (const gassign *)
bool ana::int_size_in_bits (const_tree type, bit_size_t *out)
tree ana::get_field_at_bit_offset (tree record_type, bit_offset_t bit_offset)
bool ana::operator< (const region_offset &, const region_offset &)
bool ana::operator<= (const region_offset &, const region_offset &)
bool ana::operator> (const region_offset &, const region_offset &)
bool ana::operator>= (const region_offset &, const region_offset &)
location_t ana::get_stmt_location (const gimple *stmt, function *fun)
bool ana::compat_types_p (tree src_type, tree dst_type)
void ana::register_known_functions (known_function_manager &kfm, region_model_manager &rmm)
void ana::register_known_analyzer_functions (known_function_manager &kfm)
void ana::register_known_fd_functions (known_function_manager &kfm)
void ana::register_known_file_functions (known_function_manager &kfm)
void ana::register_known_functions_lang_cp (known_function_manager &kfm)
void ana::register_varargs_builtins (known_function_manager &kfm)
tree ana::get_stashed_constant_by_name (const char *name)
void ana::log_stashed_constants (logger *logger)
FILE * ana::get_or_create_any_logfile ()
std::unique_ptr< json::valueana::tree_to_json (tree node)
std::unique_ptr< json::valueana::diagnostic_event_id_to_json (const diagnostic_event_id_t &)
std::unique_ptr< json::valueana::bit_offset_to_json (const bit_offset_t &offset)
std::unique_ptr< json::valueana::byte_offset_to_json (const byte_offset_t &offset)
tristate ana::compare_constants (tree lhs_const, enum tree_code op, tree rhs_const)
tree ana::get_string_cst_size (const_tree string_cst)
tree ana::get_ssa_default_def (const function &fun, tree var)
const svalueana::strip_types (const svalue *sval, region_model_manager &mgr)
region_offset ana::strip_types (const region_offset &offset, region_model_manager &mgr)
tree ana::remove_ssa_names (tree expr)
bool is_special_named_call_p (const gcall &call, const char *funcname, unsigned int num_args, bool look_in_std=false)
bool is_named_call_p (const_tree fndecl, const char *funcname)
bool is_named_call_p (const_tree fndecl, const char *funcname, const gcall &call, unsigned int num_args)
bool is_std_function_p (const_tree fndecl)
bool is_std_named_call_p (const_tree fndecl, const char *funcname)
bool is_std_named_call_p (const_tree fndecl, const char *funcname, const gcall &call, unsigned int num_args)
bool is_setjmp_call_p (const gcall &call)
bool is_longjmp_call_p (const gcall &call)
bool is_placement_new_p (const gcall &call)
bool is_cxa_throw_p (const gcall &call)
bool is_cxa_rethrow_p (const gcall &call)
const char * get_user_facing_name (const gcall &call)
void register_analyzer_pass ()
label_text make_label_text (bool can_colorize, const char *fmt,...)
label_text make_label_text_n (bool can_colorize, unsigned HOST_WIDE_INT n, const char *singular_fmt, const char *plural_fmt,...)
bool fndecl_has_gimple_body_p (tree fndecl)
void sorry_no_analyzer ()

Macro Definition Documentation

◆ INCLUDE_VECTOR

#define INCLUDE_VECTOR
Base header for the analyzer, plus utility functions.
   Copyright (C) 2019-2025 Free Software Foundation, Inc.
   Contributed by David Malcolm <dmalcolm@redhat.com>.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.

GCC is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3.  If not see
<http://www.gnu.org/licenses/>.   

Function Documentation

◆ fndecl_has_gimple_body_p()

bool fndecl_has_gimple_body_p ( tree fndecl)
extern

◆ get_user_facing_name()

const char * get_user_facing_name ( const gcall & call)
extern

◆ is_cxa_rethrow_p()

bool is_cxa_rethrow_p ( const gcall & call)
extern

◆ is_cxa_throw_p()

bool is_cxa_throw_p ( const gcall & call)
extern

◆ is_longjmp_call_p()

bool is_longjmp_call_p ( const gcall & call)
extern

◆ is_named_call_p() [1/2]

bool is_named_call_p ( const_tree fndecl,
const char * funcname )
extern

◆ is_named_call_p() [2/2]

bool is_named_call_p ( const_tree fndecl,
const char * funcname,
const gcall & call,
unsigned int num_args )
extern

◆ is_placement_new_p()

bool is_placement_new_p ( const gcall & call)
extern

◆ is_setjmp_call_p()

bool is_setjmp_call_p ( const gcall & call)
extern

◆ is_special_named_call_p()

bool is_special_named_call_p ( const gcall & call,
const char * funcname,
unsigned int num_args,
bool look_in_std = false )
extern

◆ is_std_function_p()

bool is_std_function_p ( const_tree fndecl)
extern

◆ is_std_named_call_p() [1/2]

bool is_std_named_call_p ( const_tree fndecl,
const char * funcname )
extern

◆ is_std_named_call_p() [2/2]

bool is_std_named_call_p ( const_tree fndecl,
const char * funcname,
const gcall & call,
unsigned int num_args )
extern

◆ make_label_text()

label_text make_label_text ( bool can_colorize,
const char * fmt,
... )
extern

◆ make_label_text_n()

label_text make_label_text_n ( bool can_colorize,
unsigned HOST_WIDE_INT n,
const char * singular_fmt,
const char * plural_fmt,
... )
extern

◆ register_analyzer_pass()

void register_analyzer_pass ( )
extern

◆ sorry_no_analyzer()

void sorry_no_analyzer ( )
extern
Disable -Wformat-diag; we want to be able to use pp_printf
for logging/dumping without complying with the rules for diagnostics.   
Issue a "sorry" diagnostic that the analyzer was not enabled.   

References sorry().