23 const std::string &pattern,
24 const char *header_file,
27 std::istringstream hdr(header_file);
29 while(std::getline(hdr, line))
32 if(
has_prefix(line,
"//") || line.find(pattern) == std::string::npos)
44 const std::ostringstream &s,
48 std::istringstream in(s.str());
51 ansi_c_parser.set_file(ID_built_in);
57 ansi_c_parser.cpp98=
false;
58 ansi_c_parser.cpp11=
false;
63 if(ansi_c_parser.parse())
71 ansi_c_parser.parse_tree,
80 symbol_tablet::symbolst::const_iterator s_it=
81 new_symbol_table.
symbols.find(identifier);
83 if(s_it==new_symbol_table.
symbols.end())
86 message.
error() <<
"failed to produce built-in symbol '" << identifier
92 symbol_table.
add(s_it->second);
102 bool support_float16_type,
107 const std::string pattern=
' '+
id2string(identifier)+
'(';
109 std::ostringstream s;
117 return convert(identifier, s, symbol_table, mh);
123 return convert(identifier, s, symbol_table, mh);
130 return convert(identifier, s, symbol_table, mh);
137 return convert(identifier, s, symbol_table, mh);
147 return convert(identifier, s, symbol_table, mh);
150 return convert(identifier, s, symbol_table, mh);
153 return convert(identifier, s, symbol_table, mh);
156 return convert(identifier, s, symbol_table, mh);
159 return convert(identifier, s, symbol_table, mh);
162 return convert(identifier, s, symbol_table, mh);
165 return convert(identifier, s, symbol_table, mh);
172 return convert(identifier, s, symbol_table, mh);
175 return convert(identifier, s, symbol_table, mh);
178 return convert(identifier, s, symbol_table, mh);
181 return convert(identifier, s, symbol_table, mh);
184 return convert(identifier, s, symbol_table, mh);
187 return convert(identifier, s, symbol_table, mh);
195 return convert(identifier, s, symbol_table, mh);
205 return convert(identifier, s, symbol_table, mh);
212 return convert(identifier, s, symbol_table, mh);
const char cprover_builtin_headers[]
const char gcc_builtin_headers_ia32[]
const char gcc_builtin_headers_ia32_2[]
const char gcc_builtin_headers_ia32_5[]
const char gcc_builtin_headers_ubsan[]
void ansi_c_internal_additions(std::string &code, bool support_float16_type)
const char windows_builtin_headers[]
const char gcc_builtin_headers_mem_string[]
const char gcc_builtin_headers_ia32_4[]
const char gcc_builtin_headers_generic[]
const char gcc_builtin_headers_tm[]
const char cw_builtin_headers[]
const char gcc_builtin_headers_math[]
const char gcc_builtin_headers_arm[]
const char gcc_builtin_headers_ia32_6[]
const char gcc_builtin_headers_mips[]
const char clang_builtin_headers[]
const char arm_builtin_headers[]
const char gcc_builtin_headers_omp[]
const char gcc_builtin_headers_ia32_3[]
const char gcc_builtin_headers_power[]
void ansi_c_scanner_init(ansi_c_parsert &)
bool ansi_c_typecheck(ansi_c_parse_treet &ansi_c_parse_tree, symbol_table_baset &symbol_table, const std::string &module, message_handlert &message_handler)
ANSI-C Language Type Checking.
static bool convert(const irep_idt &identifier, const std::ostringstream &s, symbol_table_baset &symbol_table, message_handlert &message_handler)
bool builtin_factory(const irep_idt &identifier, bool support_float16_type, symbol_table_baset &symbol_table, message_handlert &mh)
Check whether given identifier is a compiler built-in.
static bool find_pattern(const std::string &pattern, const char *header_file, std::ostream &out)
struct configt::ansi_ct ansi_c
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Class that provides messages with a built-in verbosity 'level'.
The symbol table base class interface.
const symbolst & symbols
Read-only field, used to look up symbols given their names.
bool add(const symbolt &symbol)
Add a new symbol to the symbol table.
bool has_prefix(const std::string &s, const std::string &prefix)
const std::string & id2string(const irep_idt &d)
std::string strip_string(const std::string &s)
Remove all whitespace characters from either end of a string.
bool ts_18661_3_Floatn_types