File tree 2 files changed +6
-15
lines changed
2 files changed +6
-15
lines changed Original file line number Diff line number Diff line change @@ -165,10 +165,9 @@ const symbolt &cpp_typecheckt::class_template_symbol(
165
165
INVARIANT_STRUCTURED (
166
166
template_scope!=nullptr , nullptr_exceptiont, " template_scope is null" );
167
167
168
- irep_idt identifier=
169
- id2string (template_scope->prefix )+
170
- " tag-" +id2string (template_symbol.base_name )+
171
- id2string (suffix);
168
+ irep_idt identifier = id2string (template_scope->get_parent ().prefix ) +
169
+ " tag-" + id2string (template_symbol.base_name ) +
170
+ id2string (suffix);
172
171
173
172
// already there?
174
173
symbol_tablet::symbolst::const_iterator s_it=
@@ -205,9 +204,8 @@ const symbolt &cpp_typecheckt::class_template_symbol(
205
204
206
205
id.id_class =cpp_idt::id_classt::CLASS;
207
206
id.is_scope =true ;
208
- id.prefix =template_scope->prefix +
209
- id2string (s_ptr->base_name )+
210
- id2string (suffix)+" ::" ;
207
+ id.prefix = template_scope->get_parent ().prefix +
208
+ id2string (s_ptr->base_name ) + id2string (suffix) + " ::" ;
211
209
id.class_identifier =s_ptr->name ;
212
210
id.id_class =cpp_idt::id_classt::CLASS;
213
211
Original file line number Diff line number Diff line change @@ -719,11 +719,7 @@ cpp_scopet &cpp_typecheckt::typecheck_template_parameters(
719
719
std::string id_suffix=" template::" +std::to_string (template_counter++);
720
720
721
721
// produce a new scope for the template parameters
722
- cpp_scopet &template_scope=
723
- cpp_scopes.current_scope ().new_scope (
724
- cpp_scopes.current_scope ().prefix +id_suffix);
725
-
726
- template_scope.prefix =template_scope.get_parent ().prefix +id_suffix;
722
+ cpp_scopet &template_scope = cpp_scopes.current_scope ().new_scope (id_suffix);
727
723
template_scope.id_class =cpp_idt::id_classt::TEMPLATE_SCOPE;
728
724
729
725
cpp_scopes.go_to (template_scope);
@@ -826,9 +822,6 @@ cpp_scopet &cpp_typecheckt::typecheck_template_parameters(
826
822
#endif
827
823
}
828
824
829
- // continue without adding to the prefix
830
- template_scope.prefix =template_scope.get_parent ().prefix ;
831
-
832
825
return template_scope;
833
826
}
834
827
You can’t perform that action at this time.
0 commit comments