C++: Fix matching NamedType

NamedType::isEqualTo() wasn't properly moved to Matcher.

In the test case, the function argument matching was failing.

Change-Id: Ia3cb82c11b039ddea61a41d9574f56d43da16ed0
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
Nikolai Kosjar
2014-05-27 09:25:29 -04:00
parent d9ba7998c5
commit 2e91dd1f3d
2 changed files with 19 additions and 1 deletions

View File

@@ -159,7 +159,15 @@ bool Matcher::match(const NamedType *type, const NamedType *otherType)
if (type == otherType)
return true;
else if (! Matcher::match(type->name(), otherType->name(), this))
const Name *name = type->name();
if (const QualifiedNameId *q = name->asQualifiedNameId())
name = q->name();
const Name *otherName = otherType->name();
if (const QualifiedNameId *q = otherName->asQualifiedNameId())
otherName = q->name();
if (! Matcher::match(name, otherName, this))
return false;
return true;