<table><tr><td style="">flherne updated the summary for this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-fr35yxro6pqsstc/" rel="noreferrer">(Show Details)</a><br />flherne updated the test plan for this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-mu65w2j6sijgegq/" rel="noreferrer">(Show Details)</a><br />flherne updated this revision to Diff 8557.<br />flherne added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D3512" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>Rebased on top of <a href="https://paste.kde.org/pk5cglavm" class="remarkup-link" target="_blank" rel="noreferrer">https://paste.kde.org/pk5cglavm</a> (patch to rename functionDeclarationForCalledDeclaration to functionForCalled, and change its signature slightly).</p>

<p>Split visitCall() into its own method, where it was previously bodged into visitName().</p></div></div><br /><div><strong>EDIT DETAILS</strong><div><div style="white-space: pre-wrap; color: #74777D;"><div style="padding: 8px 0;">...</div>Uses of `__call__()` were incorrectly shown as uses of `__init__()`.<br />
<span style="padding: 0 2px; color: #3e6d35; background: rgba(151, 234, 151, .6);">    </span><br />
This removes `ExpressionAst::belongsToCall`, because it's always equal to <span style="padding: 0 2px; color: #3e6d35; background: rgba(151, 234, 151, .6);">`</span>ExpressionAst::parent<span style="padding: 0 2px; color: #3e6d35; background: rgba(151, 234, 151, .6);">`</span> or null.<br />
<br />
T<span style="padding: 0 2px; color: #802b2b; background: rgba(251, 175, 175, .7);">ODO: `UseBuilder::visitName()` needs tidying, and the new argument to `functionDeclarationForCalledDeclaration()` - can I rename that to something shorter, please?! - could be used elsewhere;</span><span style="padding: 0 2px; color: #3e6d35; background: rgba(151, 234, 151, .6);">his adds a new parameter `isAlias` to `functionForCalled()`,</span> <span style="padding: 0 2px; color: #802b2b; background: rgba(251, 175, 175, .7);">possibly to make `ExpressionBuilder::visitCall()` simpler</span><span style="padding: 0 2px; color: #3e6d35; background: rgba(151, 234, 151, .6);">which allows it to distinguish between calling a class object (constructor `__init__()`) and calling an instance of that class with `__call__()`</span>.<br />
<span style="padding: 0 2px; color: #802b2b; background: rgba(251, 175, 175, .7);">If this approach looks sane</span><span style="padding: 0 2px; color: #3e6d35; background: rgba(151, 234, 151, .6);">    <br />
This parameter can (and probably should) be used in other callers to improve parsing or just simplify code. For now</span>, <span style="padding: 0 2px; color: #802b2b; background: rgba(251, 175, 175, .7);">I'll carry on and post an updated version</span><span style="padding: 0 2px; color: #3e6d35; background: rgba(151, 234, 151, .6);">the default value of `true` causes `functionForCalled()` to behave as before</span>.</div></div></div><br /><div><strong>EDIT DETAILS</strong><div><div style="white-space: pre-wrap; color: #74777D;">No test regressions. No new tests, because <span style="padding: 0 2px; color: #802b2b; background: rgba(251, 175, 175, .7);">I do</span><span style="padding: 0 2px; color: #3e6d35; background: rgba(151, 234, 151, .6);">the test framework does</span>n't <span style="padding: 0 2px; color: #802b2b; background: rgba(251, 175, 175, .7);">know how.<br />
Doesn't seem to</span><span style="padding: 0 2px; color: #3e6d35; background: rgba(151, 234, 151, .6);">seem to support use ranges currently.<br />
<br />
Tested on some real projects, didn't</span> crash.</div></div></div><br /><div><strong>REPOSITORY</strong><div><div>rKDEVPYTHON KDev-python</div></div></div><br /><div><strong>CHANGES SINCE LAST UPDATE</strong><div><a href="https://phabricator.kde.org/D3512?vs=8527&id=8557" rel="noreferrer">https://phabricator.kde.org/D3512?vs=8527&id=8557</a></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D3512" rel="noreferrer">https://phabricator.kde.org/D3512</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>duchain/helpers.cpp<br />
duchain/helpers.h<br />
duchain/usebuilder.cpp<br />
duchain/usebuilder.h<br />
parser/ast.cpp<br />
parser/ast.h<br />
parser/generated.h<br />
parser/python35.sdef</div></div></div><br /><div><strong>EMAIL PREFERENCES</strong><div><a href="https://phabricator.kde.org/settings/panel/emailpreferences/" rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br /><div><strong>To: </strong>flherne, brauch<br /><strong>Cc: </strong>kdevelop-devel<br /></div>