forked from qt-creator/qt-creator
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:
10
src/libs/3rdparty/cplusplus/Matcher.cpp
vendored
10
src/libs/3rdparty/cplusplus/Matcher.cpp
vendored
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user