[Differential] [Commandeered] D583: Fix DUChainUtils::getInheriters.
mwolff (Milian Wolff)
noreply at phabricator.kde.org
Sun Feb 14 17:44:27 UTC 2016
mwolff commandeered this revision.
mwolff added a reviewer: gsmolarczyk.
mwolff added a comment.
I've now pushed a proper fix for this issue to kdev-clang. No DUChain feature needs to be changed, it was a misuse of that API that triggered this issue. Olivier was right btw, we simply should not import the semantic parent context if it equals the lexical parent.
Author: Milian Wolff <mail at milianw.de>
Date: Sun Feb 14 18:38:00 2016 +0100
Don't import the semantic parent if it equals the lexical parent.
We to import the semantic parent only if it differs from the lexical
parent, as then we deal with out-of-line declarations. For the other
case, the normal DUChain tree works fine. And importing the parent
again can lead to subtle differences, like DUChainUtils::getInheriters
misbehaving for nested classes.
This change should also have a nice positive performance impact.
To: mwolff, KDevelop, kfunk, gsmolarczyk
Cc: kfunk, olivierjg, mwolff, kdevelop-devel, arrowdodger
More information about the KDevelop-devel