forked from qt-creator/qt-creator
ClangCodeModel: Fix another output argument mis-detection
We need to relax the range check: In expressions such as x.y->z, the second argument for the operator->call is x.y, not just y. Fixes: QTCREATORBUG-27352 Change-Id: Ida542c11c129630f0a1d301508ec5f8076eb9902 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -2735,7 +2735,7 @@ static void semanticHighlighter(QFutureInterface<HighlightingResult> &future,
|
||||
// The callable is never displayed as an output parameter.
|
||||
// TODO: A good argument can be made to display objects on which a non-const
|
||||
// operator or function is called as output parameters.
|
||||
if (children.at(1).range() == range)
|
||||
if (children.at(1).range().contains(range))
|
||||
return false;
|
||||
|
||||
QList<AstNode> firstChildTree{children.first()};
|
||||
|
||||
Reference in New Issue
Block a user