Added the newly created Enum symbol to its enclosing class or namespace scope.

This commit is contained in:
Roberto Raggi
2010-08-13 11:59:51 +02:00
parent a592df029a
commit 16adcf3114

View File

@@ -2407,6 +2407,7 @@ bool Bind::visit(EnumSpecifierAST *ast)
const Name *enumName = this->name(ast->name);
Enum *e = control()->newEnum(sourceLocation, enumName);
ast->symbol = e;
_scope->addMember(e);
Scope *previousScope = switchScope(e);
for (EnumeratorListAST *it = ast->enumerator_list; it; it = it->next) {