C++: Fix resolving of recursive typedef

Use-case:
template<typename _Tp>
struct Temp { typedef _Tp value_type; };

struct Foo { int bar; };

void func()
{
    Temp<Temp<Foo> >::value_type::value_type *p;
    p->bar; // bar not highlighted
}

Task-number: QTCREATORBUG-14237
Change-Id: Ie0b21b81526d610437ed2d2877083bb929c25047
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
Orgad Shaneh
2015-05-19 20:25:13 +03:00
committed by Orgad Shaneh
parent cbc122e2e2
commit 81721f6781
3 changed files with 1 additions and 3 deletions

View File

@@ -1103,7 +1103,7 @@ LookupScope *LookupScopePrivate::lookupType_helper(
foreach (Symbol *s, _symbols) {
if (Class *klass = s->asClass()) {
if (klass->identifier() && klass->identifier()->match(name->identifier()))
if (klass->name() && klass->name()->match(name))
return q;
}
}