[Differential] [Request, 121 lines] D3524: Make ExpressionVisitor::visitCall() clearer.
flherne (Francis Herne)
noreply at phabricator.kde.org
Sun Nov 27 23:26:53 UTC 2016
flherne created this revision.
flherne added a reviewer: brauch.
flherne set the repository for this revision to rKDEVPYTHON KDev-python.
Restricted Application added a subscriber: kdevelop-devel.
REVISION SUMMARY
Rename `checkForDecorators()` to `docstringTypeOverride()`, because it doesn't do anything involving decorators. (!)
Move the code choosing between class and function types to `visitCall()`, because it's nothing to do with docstring contents and made the different code paths very hard to follow.
Make it return the type it produces, rather than calling `encounter()` itself, for clarity.
Use the new `isAlias` argument of `functionForCalled` instead of some code to do the same thing.
TEST PLAN
No intended changes in behaviour.
Passes all existing tests.
TODO: There's one problem that remains unchanged - if we lose the alias state of class objects (e.g. by putting them in a container), they're interpreted and called as instances (i.e. we use `__call__` instead of the constructor).
Add a test for this.
REPOSITORY
rKDEVPYTHON KDev-python
REVISION DETAIL
https://phabricator.kde.org/D3524
AFFECTED FILES
duchain/expressionvisitor.cpp
duchain/expressionvisitor.h
duchain/helpers.h
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: flherne, brauch
Cc: kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20161127/d78092da/attachment.html>
More information about the KDevelop-devel
mailing list