Ejemplo n.º 1
0
bool DestructorNameId::isEqualTo(const Name *other) const
{
    const DestructorNameId *d = other->asDestructorNameId();
    if (! d)
        return false;
    Identifier *l = identifier();
    Identifier *r = d->identifier();
    return l->isEqualTo(r);
}
Ejemplo n.º 2
0
bool NameId::isEqualTo(const Name *other) const
{
    const NameId *nameId = other->asNameId();
    if (! nameId)
        return false;
    Identifier *l = identifier();
    Identifier *r = nameId->identifier();
    return l->isEqualTo(r);
}
Ejemplo n.º 3
0
bool TemplateNameId::isEqualTo(const Name *other) const
{
    const TemplateNameId *t = other->asTemplateNameId();
    if (! t)
        return false;
    Identifier *l = identifier();
    Identifier *r = t->identifier();
    if (! l->isEqualTo(r))
        return false;
    if (_templateArgumentCount != t->_templateArgumentCount)
        return false;
    for (unsigned i = 0; i < _templateArgumentCount; ++i) {
        const FullySpecifiedType &l = _templateArguments[i];
        const FullySpecifiedType &r = t->_templateArguments[i];
        if (! l.isEqualTo(r))
            return false;
    }
    return true;
}