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 @@ -124,6 +124,10 @@ void cpp_typecheckt::convert_non_template_declaration(
124124 if (!is_typedef)
125125 elaborate_class_template (declaration_type);
126126
127+ // mark as 'already typechecked'
128+ if (!declaration.declarators ().empty ())
129+ make_already_typechecked (declaration_type);
130+
127131 // Special treatment for anonymous unions
128132 if (declaration.declarators ().empty () &&
129133 follow (declaration.type ()).get_bool (ID_C_is_anonymous))
Original file line number Diff line number Diff line change @@ -249,6 +249,10 @@ void cpp_typecheckt::typecheck_type(typet &type)
249249 else if (type.id ()==ID_nullptr)
250250 {
251251 }
252+ else if (type.id ()==ID_already_typechecked)
253+ {
254+ c_typecheck_baset::typecheck_type (type);
255+ }
252256 else
253257 {
254258 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