Skip to content
Snippets Groups Projects
Commit b921489a authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Process exception declarations.

parent 084d83a5
No related branches found
No related tags found
No related merge requests found
...@@ -263,8 +263,29 @@ bool CheckDeclaration::visit(AsmDefinitionAST *) ...@@ -263,8 +263,29 @@ bool CheckDeclaration::visit(AsmDefinitionAST *)
return false; return false;
} }
bool CheckDeclaration::visit(ExceptionDeclarationAST *) bool CheckDeclaration::visit(ExceptionDeclarationAST *ast)
{ {
FullySpecifiedType ty = semantic()->check(ast->type_specifier, _scope);
FullySpecifiedType qualTy = ty.qualifiedType();
Name *name = 0;
FullySpecifiedType declTy = semantic()->check(ast->declarator, qualTy,
_scope, &name);
unsigned location = locationOfDeclaratorId(ast->declarator);
if (! location) {
if (ast->declarator)
location = ast->declarator->firstToken();
else
location = ast->firstToken();
}
Declaration *symbol = control()->newDeclaration(location, name);
symbol->setStartOffset(tokenAt(ast->firstToken()).offset);
symbol->setEndOffset(tokenAt(ast->lastToken()).offset);
symbol->setType(declTy);
_scope->enterSymbol(symbol);
return false; return false;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment