29 if((src.
id()==ID_symbol && current) ||
30 (src.
id()==ID_next_symbol && next))
31 dest.insert(src.
get(ID_identifier));
45 if((src.
id()==ID_symbol && current) ||
46 (src.
id()==ID_next_symbol && next))
47 return symbols.count(src.
get(ID_identifier))!=0;
67 std::set<exprt> &dest)
69 if(src.
id()==ID_symbol || src.
id()==ID_next_symbol)
80 std::set<symbol_exprt> &dest)
82 if(src.
id()==ID_symbol)
101 if(src.
id()==ID_symbol ||
102 src.
id()==ID_next_symbol)
103 dest.insert(src.
get(ID_identifier));
105 const irept &c_sizeof_type=src.
find(ID_C_c_sizeof_type);
108 find_symbols(kind, static_cast<const typet &>(c_sizeof_type), dest);
110 const irept &va_arg_type=src.
find(ID_C_va_arg_type);
113 find_symbols(kind, static_cast<const typet &>(va_arg_type), dest);
119 src.
id()!=ID_pointer)
127 const irep_idt &typedef_name=src.
get(ID_C_typedef);
128 if(!typedef_name.
empty())
129 dest.insert(typedef_name);
132 if(src.
id()==ID_struct ||
139 for(struct_union_typet::componentst::const_iterator
140 it=components.begin();
141 it!=components.end();
145 else if(src.
id()==ID_code)
151 for(code_typet::parameterst::const_iterator
152 it=parameters.begin();
153 it!=parameters.end();
163 else if(src.
id()==ID_symbol)
164 dest.insert(src.
get(ID_identifier));
165 else if(src.
id()==ID_array)
170 else if(src.
id()==ID_c_enum_tag)
174 else if(src.
id()==ID_struct_tag)
178 else if(src.
id()==ID_union_tag)
The type of an expression.
#define forall_subtypes(it, type)
std::vector< componentt > componentst
std::vector< parametert > parameterst
const componentst & components() const
std::unordered_set< irep_idt, irep_id_hash > find_symbols_sett
const struct_union_typet & to_struct_union_type(const typet &type)
Cast a generic typet to a struct_union_typet.
const irep_idt & id() const
const array_typet & to_array_type(const typet &type)
Cast a generic typet to an array_typet.
const c_enum_tag_typet & to_c_enum_tag_type(const typet &type)
Cast a generic typet to a c_enum_tag_typet.
API to expression classes.
const irep_idt & get(const irep_namet &name) const
Base class for tree-like data structures with sharing.
#define forall_operands(it, expr)
bool has_symbol(const exprt &src, const find_symbols_sett &symbols, bool current, bool next)
void find_non_pointer_type_symbols(const exprt &src, find_symbols_sett &dest)
const struct_tag_typet & to_struct_tag_type(const typet &type)
Cast a generic typet to a union_tag_typet.
Base type of C structs and unions, and C++ classes.
const union_tag_typet & to_union_tag_type(const typet &type)
Cast a generic typet to a union_tag_typet.
Base class for all expressions.
const parameterst & parameters() const
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast a generic exprt to a symbol_exprt.
const code_typet & to_code_type(const typet &type)
Cast a generic typet to a code_typet.
void find_type_and_expr_symbols(const exprt &src, find_symbols_sett &dest)
const typet & subtype() const
void find_type_symbols(const exprt &src, find_symbols_sett &dest)
const irept & find(const irep_namet &name) const
void find_symbols(const exprt &src, find_symbols_sett &dest)
const typet & return_type() const