Commit fc1006e2 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Highlight only the unqualified name id.

parent 0c2e8834
......@@ -464,17 +464,26 @@ bool CheckSymbols::visit(CallAST *ast)
const QByteArray expression = textOf(access);
const QList<LookupItem> candidates = typeOfExpression(expression, scope, TypeOfExpression::Preprocess);
addVirtualMethodUsage(candidates, access->member_name, argumentCount);
NameAST *memberName = access->member_name;
if (QualifiedNameAST *q = memberName->asQualifiedName())
memberName = q->unqualified_name;
addVirtualMethodUsage(candidates, memberName, argumentCount);
}
}
} else if (IdExpressionAST *idExpr = ast->base_expression->asIdExpression()) {
if (const Name *name = idExpr->name->name) {
if (maybeVirtualMethod(name)) {
NameAST *exprName = idExpr->name;
if (QualifiedNameAST *q = exprName->asQualifiedName())
exprName = q->unqualified_name;
Scope *scope = findScope(idExpr);
const QByteArray expression = textOf(idExpr);
const QList<LookupItem> candidates = typeOfExpression(expression, scope, TypeOfExpression::Preprocess);
addVirtualMethodUsage(candidates, idExpr->name, argumentCount);
addVirtualMethodUsage(candidates, exprName, argumentCount);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment