File tree 2 files changed +8
-9
lines changed
2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 1
- KNOWNBUG
1
+ CORE
2
2
main.cpp
3
3
-std=c++11
4
4
^EXIT=0$
Original file line number Diff line number Diff line change @@ -92,6 +92,8 @@ void cpp_typecheckt::typecheck_enum_type(typet &type)
92
92
bool anonymous=!enum_type.has_tag ();
93
93
irep_idt base_name;
94
94
95
+ cpp_save_scopet save_scope (cpp_scopes);
96
+
95
97
if (anonymous)
96
98
{
97
99
// we fabricate a tag based on the enum constants contained
@@ -101,14 +103,11 @@ void cpp_typecheckt::typecheck_enum_type(typet &type)
101
103
{
102
104
const cpp_namet &tag=enum_type.tag ();
103
105
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);
112
111
}
113
112
114
113
bool has_body=enum_type.has_body ();
You can’t perform that action at this time.
0 commit comments