File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 1- KNOWNBUG
1+ CORE
22main.cpp
33-std=c++11
44^EXIT=0$
Original file line number Diff line number Diff line change @@ -92,6 +92,8 @@ void cpp_typecheckt::typecheck_enum_type(typet &type)
9292 bool anonymous=!enum_type.has_tag ();
9393 irep_idt base_name;
9494
95+ cpp_save_scopet save_scope (cpp_scopes);
96+
9597 if (anonymous)
9698 {
9799 // we fabricate a tag based on the enum constants contained
@@ -101,14 +103,11 @@ void cpp_typecheckt::typecheck_enum_type(typet &type)
101103 {
102104 const cpp_namet &tag=enum_type.tag ();
103105
104- if (tag.is_simple_name ())
105- base_name=tag.get_base_name ();
106- else
107- {
108- error ().source_location =type.source_location ();
109- error () << " enum tag is expected to be a simple name" << eom;
110- throw 0 ;
111- }
106+ cpp_template_args_non_tct template_args;
107+ template_args.make_nil ();
108+
109+ cpp_typecheck_resolvet resolver (*this );
110+ resolver.resolve_scope (tag, base_name, template_args);
112111 }
113112
114113 bool has_body=enum_type.has_body ();
You can’t perform that action at this time.
0 commit comments