File tree Expand file tree Collapse file tree 4 files changed +12
-1
lines changed Expand file tree Collapse file tree 4 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -384,6 +384,9 @@ void cpp_typecheckt::typecheck_decl(codet &code)
384384 return ;
385385 }
386386
387+ // mark as 'already typechecked'
388+ make_already_typechecked (type);
389+
387390 codet new_code (ID_decl_block);
388391 new_code.reserve_operands (declaration.declarators ().size ());
389392
Original file line number Diff line number Diff line change @@ -129,6 +129,10 @@ void cpp_typecheckt::convert_non_template_declaration(
129129 if (!is_typedef)
130130 elaborate_class_template (declaration_type);
131131
132+ // mark as 'already typechecked'
133+ if (!declaration.declarators ().empty ())
134+ make_already_typechecked (declaration_type);
135+
132136 // Special treatment for anonymous unions
133137 if (declaration.declarators ().empty () &&
134138 follow (declaration.type ()).get_bool (ID_C_is_anonymous))
Original file line number Diff line number Diff line change @@ -260,6 +260,10 @@ void cpp_typecheckt::typecheck_type(typet &type)
260260 else if (type.id ()==ID_nullptr)
261261 {
262262 }
263+ else if (type.id ()==ID_already_typechecked)
264+ {
265+ c_typecheck_baset::typecheck_type (type);
266+ }
263267 else
264268 {
265269 error ().source_location =type.source_location ();
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ exprt cpp_symbol_expr(const symbolt &symbol);
1717
1818inline void already_typechecked (irept & irep )
1919{
20- exprt tmp ("already_typechecked" );
20+ exprt tmp (ID_already_typechecked );
2121 tmp .copy_to_operands (static_cast < exprt & > (irep ));
2222 irep .swap (tmp );
2323}
You can’t perform that action at this time.
0 commit comments