Commit 33d27097 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

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

Missed a spot in ad4cb444



Task-number: QTCREATORBUG-14141
Change-Id: I1a6a25ce3e9c2a680e1b8eebec01a17749cdb026
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@theqtcompany.com>
parent e335fd4c
...@@ -1222,16 +1222,19 @@ LookupScopePrivate *LookupScopePrivate::findNestedType(const Name *name, LookupS ...@@ -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);
......
...@@ -1202,7 +1202,6 @@ void tst_CheckSymbols::findField() ...@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment