C++: handle destructor names with template parameters.

Change-Id: I74b4fd5e043db935abc18345b303d294b71e8fc2
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@nokia.com>
This commit is contained in:
Erik Verbruggen
2012-02-16 10:54:44 +01:00
parent c9999a9382
commit 368d5926ca
17 changed files with 277 additions and 47 deletions

View File

@@ -91,7 +91,7 @@ unsigned Bind::location(NameAST *name, unsigned defaultLocation) const
return defaultLocation;
else if (DestructorNameAST *dtor = name->asDestructorName())
return dtor->identifier_token;
return location(dtor->unqualified_name, defaultLocation);
else if (TemplateIdAST *templId = name->asTemplateId())
return templId->identifier_token;
@@ -2624,8 +2624,7 @@ bool Bind::visit(SimpleNameAST *ast)
bool Bind::visit(DestructorNameAST *ast)
{
const Identifier *id = identifier(ast->identifier_token);
_name = control()->destructorNameId(id);
_name = control()->destructorNameId(name(ast->unqualified_name));
ast->name = _name;
return false;
}