forked from qt-creator/qt-creator
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:
committed by
Orgad Shaneh
parent
cbc122e2e2
commit
81721f6781
@@ -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;
|
||||
}
|
||||
}
|
||||
|
@@ -333,7 +333,6 @@ void CppToolsPlugin::test_completion()
|
||||
QEXPECT_FAIL("enum_in_function_in_struct_in_function_anon", "QTCREATORBUG-13757", Abort);
|
||||
QEXPECT_FAIL("enum_in_class_accessed_in_member_func_cxx11", "QTCREATORBUG-13757", Abort);
|
||||
QEXPECT_FAIL("enum_in_class_accessed_in_member_func_inline_cxx11", "QTCREATORBUG-13757", Abort);
|
||||
QEXPECT_FAIL("recursive_instantiation_of_template_type", "QTCREATORBUG-14237", Abort);
|
||||
QCOMPARE(actualCompletions, expectedCompletions);
|
||||
}
|
||||
|
||||
|
@@ -1203,7 +1203,6 @@ void tst_CheckSymbols::findField()
|
||||
source[position] = ' ';
|
||||
BaseTestCase tc(source);
|
||||
Use use = tc.findUse(line, column);
|
||||
QEXPECT_FAIL("recursive_instantiation_of_template_type", "QTCREATORBUG-14237", Abort);
|
||||
QVERIFY(use.isValid());
|
||||
QVERIFY(use.kind == Highlighting::FieldUse);
|
||||
}
|
||||
|
Reference in New Issue
Block a user