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

Annotate function declarators.

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