C++: Fix highlighting of member on indirect specialization typedef

Missed a spot in ad4cb444fb

Task-number: QTCREATORBUG-14141
Change-Id: I1a6a25ce3e9c2a680e1b8eebec01a17749cdb026
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
Orgad Shaneh
2015-05-04 23:22:39 +03:00
committed by Orgad Shaneh
parent e335fd4c13
commit 33d270976e
2 changed files with 7 additions and 5 deletions

View File

@@ -1222,16 +1222,19 @@ LookupScopePrivate *LookupScopePrivate::findNestedType(const Name *name, LookupS
Declaration *decl = typedefit->second; Declaration *decl = typedefit->second;
if (_alreadyConsideredTypedefs.contains(decl)) if (_alreadyConsideredTypedefs.contains(decl))
return 0; return 0;
LookupScopePrivate *binding = 0;
_alreadyConsideredTypedefs.insert(decl); _alreadyConsideredTypedefs.insert(decl);
if (const NamedType *namedTy = decl->type()->asNamedType()) { if (const NamedType *namedTy = decl->type()->asNamedType()) {
if (LookupScope *e = q->lookupType(namedTy->name())) if (LookupScope *e = q->lookupType(namedTy->name())) {
return e->d; binding = e->d;
if (origin) { } else if (origin) {
if (LookupScope *e = origin->q->lookupType(namedTy->name())) if (LookupScope *e = origin->q->lookupType(namedTy->name()))
return e->d; binding = e->d;
} }
} }
_alreadyConsideredTypedefs.remove(decl); _alreadyConsideredTypedefs.remove(decl);
if (binding)
return binding;
} }
auto it = _nestedScopes.find(name); auto it = _nestedScopes.find(name);

View File

@@ -1202,7 +1202,6 @@ void tst_CheckSymbols::findField()
source[position] = ' '; source[position] = ' ';
BaseTestCase tc(source); BaseTestCase tc(source);
Use use = tc.findUse(line, column); Use use = tc.findUse(line, column);
QEXPECT_FAIL("pointer_indirect_specialization_typedef", "QTCREATORBUG-14141", Abort);
QEXPECT_FAIL("pointer_indirect_specialization_double_indirection", "QTCREATORBUG-14141", Abort); QEXPECT_FAIL("pointer_indirect_specialization_double_indirection", "QTCREATORBUG-14141", Abort);
QEXPECT_FAIL("pointer_indirect_specialization_double_indirection_with_base", "QTCREATORBUG-14141", Abort); QEXPECT_FAIL("pointer_indirect_specialization_double_indirection_with_base", "QTCREATORBUG-14141", Abort);
QEXPECT_FAIL("recursive_instantiation_of_template_type", "QTCREATORBUG-14237", Abort); QEXPECT_FAIL("recursive_instantiation_of_template_type", "QTCREATORBUG-14237", Abort);