Commit 646baadb authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Annotate EnumSpecifierASTs with the Enum symbols.

parent 633580d7
......@@ -1623,6 +1623,9 @@ public:
EnumeratorListAST *enumerator_list;
unsigned rbrace_token;
public: // annotations
Enum *symbol;
public:
EnumSpecifierAST()
: enum_token(0)
......@@ -1630,6 +1633,7 @@ public:
, lbrace_token(0)
, enumerator_list(0)
, rbrace_token(0)
, symbol(0)
{}
virtual EnumSpecifierAST *asEnumSpecifier() { return this; }
......
......@@ -407,6 +407,7 @@ bool CheckSpecifier::visit(EnumSpecifierAST *ast)
const Name *name = semantic()->check(ast->name, _scope);
Enum *e = control()->newEnum(sourceLocation, name);
ast->symbol = e;
e->members()->setStartOffset(scopeStart);
e->members()->setEndOffset(tokenAt(ast->lastToken() - 1).end());
e->setVisibility(semantic()->currentVisibility());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment