Changeset View
Changeset View
Standalone View
Standalone View
duchain/usebuilder.cpp
Show First 20 Lines • Show All 67 Lines • ▼ Show 20 Line(s) | 63 | void UseBuilder::useHiddenMethod(ExpressionAst* value, Declaration* function) { | |||
---|---|---|---|---|---|
68 | if ( function && function->isFunctionDeclaration() ) { | 68 | if ( function && function->isFunctionDeclaration() ) { | ||
69 | UseBuilderBase::newUse(value, useRange, DeclarationPointer(function)); | 69 | UseBuilderBase::newUse(value, useRange, DeclarationPointer(function)); | ||
70 | } | 70 | } | ||
71 | } | 71 | } | ||
72 | 72 | | |||
73 | void UseBuilder::visitName(NameAst* node) | 73 | void UseBuilder::visitName(NameAst* node) | ||
74 | { | 74 | { | ||
75 | DUContext* context = contextAtOrCurrent(editorFindPositionSafe(node)); | 75 | DUContext* context = contextAtOrCurrent(editorFindPositionSafe(node)); | ||
76 | Declaration* declaration = Helper::declarationForName(identifierForNode(node->identifier), | 76 | Declaration* declaration = Helper::declarationForName(node, editorFindPositionSafe(node), | ||
77 | editorFindRange(node, node), | | |||
78 | DUChainPointer<const DUContext>(context)); | 77 | DUChainPointer<const DUContext>(context)); | ||
79 | 78 | | |||
80 | Q_ASSERT(node->identifier); | 79 | Q_ASSERT(node->identifier); | ||
81 | RangeInRevision useRange = rangeForNode(node->identifier, true); | 80 | RangeInRevision useRange = rangeForNode(node->identifier, true); | ||
82 | 81 | | |||
83 | if ( declaration && declaration->range() == useRange ) return; | 82 | if ( declaration && declaration->range() == useRange ) return; | ||
84 | 83 | | |||
85 | if ( ! declaration && m_errorReportingEnabled ) { | 84 | if ( ! declaration && m_errorReportingEnabled ) { | ||
▲ Show 20 Lines • Show All 93 Lines • Show Last 20 Lines |