D14876: Improved type detection for object properties.
Sven Brauch
noreply at phabricator.kde.org
Fri Aug 17 10:41:20 BST 2018
brauch accepted this revision.
brauch added a comment.
This revision is now accepted and ready to land.
Maybe you make the the visitAssignment code a bit more readable by breaking it up into 2-3 functions?
If you tend to the inline notes, this does not look too wrong ...
INLINE COMMENTS
> declarationbuilder.cpp:1197
> + if ( dec->kind() == Declaration::Kind::Instance) {
> + ClassMemberDeclaration *classDec = dynamic_cast<ClassMemberDeclaration*>(dec);
> +
move this down below the next condition, it doesn't need it
> declarationbuilder.cpp:1215
> + }
> + lock.unlock();
> +
I don't think you are allowed to unlock the lock here, you are still using the items below ... but in the builder code, stuff like this usually works because you have the parse lock in addition, so no idea.
> declarationbuilder.cpp:1226
> + if (type && type->dataType() == IntegralType::TypeNull) {
> + DUChainWriteLocker wlock(DUChain::lock());
> + dec->setAbstractType(currentAbstractType());
replace by: DUChainWriteLocker wlock;
> declarationbuilder.cpp:1228
> + dec->setAbstractType(currentAbstractType());
> + wlock.unlock();
> + }
remove this, it's unlocked automatically here anyways
> declarationbuilder.cpp:1248
> + }
> + lock.unlock();
> +
as above
> declarationbuilder.cpp:1270
> + dec->setAbstractType(currentAbstractType());
> + wlock.unlock();
> + }
remove
REPOSITORY
R52 KDevelop: PHP Support
BRANCH
classes
REVISION DETAIL
https://phabricator.kde.org/D14876
To: pprkut, brauch
Cc: brauch, kdevelop-devel, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20180817/cb6a3ccf/attachment-0001.html>
More information about the KDevelop-devel
mailing list