Merge remote-tracking branch 'origin/7.0'

Change-Id: I9a7a9a5579f1f4e277e7927eefb1bab9ca60ad4a
This commit is contained in:
Eike Ziller
2022-04-07 09:51:40 +02:00
23 changed files with 168 additions and 41 deletions

View File

@@ -2835,9 +2835,15 @@ static void semanticHighlighter(QFutureInterface<HighlightingResult> &future,
if (path.rbegin()->hasConstType())
return false;
for (auto it = path.rbegin() + 1; it != path.rend(); ++it) {
if (it->kind() == "Call" || it->kind() == "CXXConstruct"
|| it->kind() == "MemberInitializer") {
if (it->kind() == "CXXConstruct" || it->kind() == "MemberInitializer")
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.
const QList<AstNode> children = it->children().value_or(QList<AstNode>());
return children.isEmpty() || children.first().kind() != "CXXDependentScopeMember";
}
// The token should get marked for e.g. lambdas, but not for assignment operators,