forked from qt-creator/qt-creator
Create TypenameArgument symbols.
This commit is contained in:
@@ -2083,7 +2083,7 @@ public:
|
|||||||
ExpressionAST *type_id;
|
ExpressionAST *type_id;
|
||||||
|
|
||||||
public: // annotations
|
public: // annotations
|
||||||
Argument *symbol;
|
TypenameArgument *symbol;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual TypenameTypeParameterAST *asTypenameTypeParameter() { return this; }
|
virtual TypenameTypeParameterAST *asTypenameTypeParameter() { return this; }
|
||||||
@@ -2109,7 +2109,7 @@ public:
|
|||||||
ExpressionAST *type_id;
|
ExpressionAST *type_id;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Argument *symbol;
|
TypenameArgument *symbol;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual TemplateTypeParameterAST *asTemplateTypeParameter() { return this; }
|
virtual TemplateTypeParameterAST *asTemplateTypeParameter() { return this; }
|
||||||
|
@@ -459,7 +459,9 @@ bool CheckDeclaration::visit(TypenameTypeParameterAST *ast)
|
|||||||
sourceLocation = ast->name->firstToken();
|
sourceLocation = ast->name->firstToken();
|
||||||
|
|
||||||
const Name *name = semantic()->check(ast->name, _scope);
|
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;
|
ast->symbol = arg;
|
||||||
_scope->enterSymbol(arg);
|
_scope->enterSymbol(arg);
|
||||||
return false;
|
return false;
|
||||||
@@ -472,7 +474,9 @@ bool CheckDeclaration::visit(TemplateTypeParameterAST *ast)
|
|||||||
sourceLocation = ast->name->firstToken();
|
sourceLocation = ast->name->firstToken();
|
||||||
|
|
||||||
const Name *name = semantic()->check(ast->name, _scope);
|
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;
|
ast->symbol = arg;
|
||||||
_scope->enterSymbol(arg);
|
_scope->enterSymbol(arg);
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user