Commit 1302de08 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Jump at the function's definition.

parent 5d13a206
......@@ -555,6 +555,7 @@ bool ResolveExpression::visit(MemberAccessAST *ast)
// The candidate types for the base expression are stored in
// _results.
const QList<LookupItem> baseResults = _results;
_results.clear();
// Evaluate the expression-id that follows the access operator.
const Name *memberName = 0;
......
......@@ -1427,7 +1427,7 @@ CPPEditor::Link CPPEditor::findLinkAt(const QTextCursor &cursor,
TypeOfExpression typeOfExpression;
typeOfExpression.init(doc, snapshot);
QList<LookupItem> resolvedSymbols = typeOfExpression(expression, scope, TypeOfExpression::Preprocess);
const QList<LookupItem> resolvedSymbols = typeOfExpression(expression, scope, TypeOfExpression::Preprocess);
if (!resolvedSymbols.isEmpty()) {
const LookupItem result = skipForwardDeclarations(resolvedSymbols);
......@@ -1435,12 +1435,8 @@ CPPEditor::Link CPPEditor::findLinkAt(const QTextCursor &cursor,
if (Symbol *symbol = result.declaration()) {
Symbol *def = 0;
qWarning() << "find definition?";
#warning port me
#if 0
if (resolveTarget && !lastSymbol->isFunction())
if (resolveTarget)
def = findDefinition(symbol, snapshot);
#endif
link = linkToSymbol(def ? def : symbol);
link.begin = beginOfToken;
......
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