File tree 4 files changed +12
-1
lines changed
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)
384
384
return ;
385
385
}
386
386
387
+ // mark as 'already typechecked'
388
+ make_already_typechecked (type);
389
+
387
390
codet new_code (ID_decl_block);
388
391
new_code.reserve_operands (declaration.declarators ().size ());
389
392
Original file line number Diff line number Diff line change @@ -129,6 +129,10 @@ void cpp_typecheckt::convert_non_template_declaration(
129
129
if (!is_typedef)
130
130
elaborate_class_template (declaration_type);
131
131
132
+ // mark as 'already typechecked'
133
+ if (!declaration.declarators ().empty ())
134
+ make_already_typechecked (declaration_type);
135
+
132
136
// Special treatment for anonymous unions
133
137
if (declaration.declarators ().empty () &&
134
138
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)
260
260
else if (type.id ()==ID_nullptr)
261
261
{
262
262
}
263
+ else if (type.id ()==ID_already_typechecked)
264
+ {
265
+ c_typecheck_baset::typecheck_type (type);
266
+ }
263
267
else
264
268
{
265
269
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);
17
17
18
18
inline void already_typechecked (irept & irep )
19
19
{
20
- exprt tmp ("already_typechecked" );
20
+ exprt tmp (ID_already_typechecked );
21
21
tmp .copy_to_operands (static_cast < exprt & > (irep ));
22
22
irep .swap (tmp );
23
23
}
You can’t perform that action at this time.
0 commit comments