C++11: Correct scoping for scoped enums.

Fixes completion, highlighting and find usages.

Change-Id: I1ea12c6a9c7a4f8ba0f9d55e31d6b7986233e7d8
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
Christian Kamm
2012-10-25 07:56:01 +02:00
committed by hjk
parent c55620000c
commit 19e03b186a
6 changed files with 52 additions and 25 deletions

View File

@@ -2965,6 +2965,8 @@ bool Bind::visit(EnumSpecifierAST *ast)
Enum *e = control()->newEnum(sourceLocation, enumName);
e->setStartOffset(tokenAt(sourceLocation).end()); // at the end of the enum or identifier token.
e->setEndOffset(tokenAt(ast->lastToken() - 1).end());
if (ast->key_token)
e->setScoped(true);
ast->symbol = e;
_scope->addMember(e);