Commit fef2ad6b authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Create TypenameArgument symbols.

parent f7164ae9
......@@ -2083,7 +2083,7 @@ public:
ExpressionAST *type_id;
public: // annotations
Argument *symbol;
TypenameArgument *symbol;
public:
virtual TypenameTypeParameterAST *asTypenameTypeParameter() { return this; }
......@@ -2109,7 +2109,7 @@ public:
ExpressionAST *type_id;
public:
Argument *symbol;
TypenameArgument *symbol;
public:
virtual TemplateTypeParameterAST *asTemplateTypeParameter() { return this; }
......
......@@ -459,7 +459,9 @@ bool CheckDeclaration::visit(TypenameTypeParameterAST *ast)
sourceLocation = ast->name->firstToken();
const Name *name = semantic()->check(ast->name, _scope);
Argument *arg = control()->newArgument(sourceLocation, name); // ### new template type
TypenameArgument *arg = control()->newTypenameArgument(sourceLocation, name);
FullySpecifiedType ty = semantic()->check(ast->type_id, _scope);
arg->setType(ty);
ast->symbol = arg;
_scope->enterSymbol(arg);
return false;
......@@ -472,7 +474,9 @@ bool CheckDeclaration::visit(TemplateTypeParameterAST *ast)
sourceLocation = ast->name->firstToken();
const Name *name = semantic()->check(ast->name, _scope);
Argument *arg = control()->newArgument(sourceLocation, name); // ### new template type
TypenameArgument *arg = control()->newTypenameArgument(sourceLocation, name);
FullySpecifiedType ty = semantic()->check(ast->type_id, _scope);
arg->setType(ty);
ast->symbol = arg;
_scope->enterSymbol(arg);
return false;
......
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