Commit 208f26c9 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Annotate function declarators.

parent 93698188
......@@ -711,6 +711,9 @@ public:
SpecifierAST *cv_qualifier_seq;
ExceptionSpecificationAST *exception_specification;
public: // annotations
Function *symbol;
public:
virtual unsigned firstToken() const;
virtual unsigned lastToken() const;
......
......@@ -158,6 +158,7 @@ bool CheckDeclarator::visit(NestedDeclaratorAST *ast)
bool CheckDeclarator::visit(FunctionDeclaratorAST *ast)
{
Function *fun = control()->newFunction(ast->firstToken());
ast->symbol = fun;
fun->setReturnType(_fullySpecifiedType);
if (ast->parameters) {
......
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