forked from qt-creator/qt-creator
ClangCodeModel: Fix another false positive
... in output argument highlighting. Fixes: QTCREATORBUG-27367 Change-Id: I80fc7628d62de18f9114290b8104a7a1e9a95c4b Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -2710,11 +2710,10 @@ static void semanticHighlighter(QFutureInterface<HighlightingResult> &future,
|
||||
return true;
|
||||
|
||||
if (it->kind() == "Call") {
|
||||
// In class templates, member calls can result in "Call" nodes rather than
|
||||
// "CXXMemberCall". We try to detect this by checking for a certain kind of
|
||||
// child node.
|
||||
// The first child is e.g. a called lambda or an object on which
|
||||
// the call happens, and should not be highlighted as an output argument.
|
||||
const QList<AstNode> children = it->children().value_or(QList<AstNode>());
|
||||
return children.isEmpty() || children.first().kind() != "CXXDependentScopeMember";
|
||||
return children.isEmpty() || children.first().range() != (it - 1)->range();
|
||||
}
|
||||
|
||||
// The token should get marked for e.g. lambdas, but not for assignment operators,
|
||||
|
||||
Reference in New Issue
Block a user