C++11: Allow for typename Foo<T>{}, Foo{} and int{}.

As a postfix expression.

Change-Id: I65cae0571080a9fb699af61c661328ef06f97890
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
Christian Kamm
2012-09-19 10:26:07 +02:00
committed by hjk
parent 2aa27e6d22
commit 83da5f68be
12 changed files with 65 additions and 116 deletions

View File

@@ -1312,11 +1312,7 @@ bool FindUsages::visit(TypenameCallExpressionAST *ast)
{
// unsigned typename_token = ast->typename_token;
/*const Name *name =*/ this->name(ast->name);
// unsigned lparen_token = ast->lparen_token;
for (ExpressionListAST *it = ast->expression_list; it; it = it->next) {
this->expression(it->value);
}
// unsigned rparen_token = ast->rparen_token;
this->expression(ast->expression);
return false;
}
@@ -1325,11 +1321,7 @@ bool FindUsages::visit(TypeConstructorCallAST *ast)
for (SpecifierListAST *it = ast->type_specifier_list; it; it = it->next) {
this->specifier(it->value);
}
// unsigned lparen_token = ast->lparen_token;
for (ExpressionListAST *it = ast->expression_list; it; it = it->next) {
this->expression(it->value);
}
// unsigned rparen_token = ast->rparen_token;
this->expression(ast->expression);
return false;
}