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 @@ -91,6 +91,8 @@ void cpp_typecheckt::typecheck_enum_type(typet &type)
91
91
bool anonymous=!enum_type.has_tag ();
92
92
irep_idt base_name;
93
93
94
+ cpp_save_scopet save_scope (cpp_scopes);
95
+
94
96
if (anonymous)
95
97
{
96
98
// we fabricate a tag based on the enum constants contained
@@ -100,14 +102,11 @@ void cpp_typecheckt::typecheck_enum_type(typet &type)
100
102
{
101
103
const cpp_namet &tag=enum_type.tag ();
102
104
103
- if (tag.is_simple_name ())
104
- base_name=tag.get_base_name ();
105
- else
106
- {
107
- error ().source_location =type.source_location ();
108
- error () << " enum tag is expected to be a simple name" << eom;
109
- throw 0 ;
110
- }
105
+ cpp_template_args_non_tct template_args;
106
+ template_args.make_nil ();
107
+
108
+ cpp_typecheck_resolvet resolver (*this );
109
+ resolver.resolve_scope (tag, base_name, template_args);
111
110
}
112
111
113
112
bool has_body=enum_type.has_body ();
You can’t perform that action at this time.
0 commit comments