File tree Expand file tree Collapse file tree 2 files changed +6
-15
lines changed Expand file tree Collapse file tree 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=
@@ -206,9 +205,8 @@ const symbolt &cpp_typecheckt::class_template_symbol(
206
205
207
206
id.id_class =cpp_idt::id_classt::CLASS;
208
207
id.is_scope =true ;
209
- id.prefix =template_scope->prefix +
210
- id2string (s_ptr->base_name )+
211
- id2string (suffix)+" ::" ;
208
+ id.prefix = template_scope->get_parent ().prefix +
209
+ id2string (s_ptr->base_name ) + id2string (suffix) + " ::" ;
212
210
id.class_identifier =s_ptr->name ;
213
211
id.id_class =cpp_idt::id_classt::CLASS;
214
212
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