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

@@ -62,8 +62,8 @@ bool QualifiedNameId::isEqualTo(const Name *other) const
return false;
}
DestructorNameId::DestructorNameId(const Identifier *identifier)
: _identifier(identifier)
DestructorNameId::DestructorNameId(const Name *name)
: _name(name)
{ }
DestructorNameId::~DestructorNameId()
@@ -72,8 +72,11 @@ DestructorNameId::~DestructorNameId()
void DestructorNameId::accept0(NameVisitor *visitor) const
{ visitor->visit(this); }
const Name *DestructorNameId::name() const
{ return _name; }
const Identifier *DestructorNameId::identifier() const
{ return _identifier; }
{ return _name->identifier(); }
bool DestructorNameId::isEqualTo(const Name *other) const
{
@@ -81,8 +84,8 @@ bool DestructorNameId::isEqualTo(const Name *other) const
const DestructorNameId *d = other->asDestructorNameId();
if (! d)
return false;
const Identifier *l = identifier();
const Identifier *r = d->identifier();
const Name *l = name();
const Name *r = d->name();
return l->isEqualTo(r);
}
return false;