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 @@ -124,6 +124,10 @@ void cpp_typecheckt::convert_non_template_declaration(
124
124
if (!is_typedef)
125
125
elaborate_class_template (declaration_type);
126
126
127
+ // mark as 'already typechecked'
128
+ if (!declaration.declarators ().empty ())
129
+ make_already_typechecked (declaration_type);
130
+
127
131
// Special treatment for anonymous unions
128
132
if (declaration.declarators ().empty () &&
129
133
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)
249
249
else if (type.id ()==ID_nullptr)
250
250
{
251
251
}
252
+ else if (type.id ()==ID_already_typechecked)
253
+ {
254
+ c_typecheck_baset::typecheck_type (type);
255
+ }
252
256
else
253
257
{
254
258
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