CPlusPlus: Support completion of list iterators

Fixes: QTCREATORBUG-30608
Change-Id: I169efe675e13540ecc5fbbd6b15dd13d8522db7d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Christian Stenger
2024-04-24 11:25:00 +02:00
parent 87193a0311
commit caf31c4fe9
2 changed files with 18 additions and 0 deletions

View File

@@ -1062,6 +1062,8 @@ ClassOrNamespace *ResolveExpression::baseExpression(const QList<LookupItem> &bas
}
typedefsResolver.resolve(&ty, &scope, r.binding());
if (auto ref = ty->asReferenceType()) // deref if needed
ty = ref->elementType();
if (Q_UNLIKELY(debug))
qDebug() << "- after typedef resolving:" << oo.prettyType(ty);
@@ -1082,6 +1084,9 @@ ClassOrNamespace *ResolveExpression::baseExpression(const QList<LookupItem> &bas
if (ClassOrNamespace *binding = findClass(type, scope))
return binding;
if (ClassOrNamespace *binding = findClass(type, r.scope())) // local classes and structs
return binding;
} else {
ClassOrNamespace *binding
= findClassForTemplateParameterInExpressionScope(r.binding(),
@@ -1176,6 +1181,9 @@ ClassOrNamespace *ResolveExpression::baseExpression(const QList<LookupItem> &bas
if (ClassOrNamespace *binding = findClass(ty, scope, enclosingBinding))
return binding;
if (ClassOrNamespace *binding = findClass(ty, r.scope())) // local classes and structs
return binding;
}
}