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(
165165 INVARIANT_STRUCTURED (
166166 template_scope!=nullptr , nullptr_exceptiont, " template_scope is null" );
167167
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);
172171
173172 // already there?
174173 symbol_tablet::symbolst::const_iterator s_it=
@@ -205,9 +204,8 @@ const symbolt &cpp_typecheckt::class_template_symbol(
205204
206205 id.id_class =cpp_idt::id_classt::CLASS;
207206 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) + " ::" ;
211209 id.class_identifier =s_ptr->name ;
212210 id.id_class =cpp_idt::id_classt::CLASS;
213211
Original file line number Diff line number Diff line change @@ -719,11 +719,7 @@ cpp_scopet &cpp_typecheckt::typecheck_template_parameters(
719719 std::string id_suffix=" template::" +std::to_string (template_counter++);
720720
721721 // 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);
727723 template_scope.id_class =cpp_idt::id_classt::TEMPLATE_SCOPE;
728724
729725 cpp_scopes.go_to (template_scope);
@@ -826,9 +822,6 @@ cpp_scopet &cpp_typecheckt::typecheck_template_parameters(
826822 #endif
827823 }
828824
829- // continue without adding to the prefix
830- template_scope.prefix =template_scope.get_parent ().prefix ;
831-
832825 return template_scope;
833826}
834827
You can’t perform that action at this time.
0 commit comments